Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace remaining calls to DPIUtil::get(Native)DeviceZoom() #79

Open
akoch-yatta opened this issue Jun 25, 2024 · 9 comments · Fixed by eclipse-platform/eclipse.platform.swt#1369
Assignees
Labels
HiDPI A HiDPI-Related Issue or Feature SWT Issue for SWT
Milestone

Comments

@akoch-yatta
Copy link

akoch-yatta commented Jun 25, 2024

To get rid of the static device zoom in DPIUtil, we should get rid of all remaining calls to:

  • DPIUtil::getDeviceZoom() -> Possible replacement with DPIUtil::getZoomForAutoscaleProperty(Device::getDeviceZoom())
  • DPIUtil::getNativeDeviceZoom() -> Possible replacement with Device::getDeviceZoom()

Important: problematic is that Display::getDeviceZoom() calls getPrimaryMonitor() that will throw an exception when called from another thread

@akoch-yatta akoch-yatta converted this from a draft issue Jun 25, 2024
@akoch-yatta akoch-yatta added SWT Issue for SWT HiDPI A HiDPI-Related Issue or Feature labels Jun 25, 2024
@amartya4256 amartya4256 self-assigned this Jul 17, 2024
@amartya4256 amartya4256 moved this from 🆕 New to 🏗 In Work: Short in Eclipse Jul 17, 2024
@akoch-yatta
Copy link
Author

@amartya4256 did you cover all places of that or are some still missing?

@amartya4256
Copy link

@amartya4256 did you cover all places of that or are some still missing?

Still working on it.

@amartya4256
Copy link

Here we need to think about how we are gonna replace these calls from the places where the objects are initialized. One alternative could be using the primary monitor zoom from the device but it might have some issue with threads.
Must have a follow up on this @akoch-yatta @HeikoKlare

@amartya4256 amartya4256 moved this from 🏗 In Work: Short to 👀 In Review in Eclipse Jul 26, 2024
@HeikoKlare HeikoKlare added this to the 4.34 M3 milestone Oct 21, 2024
@fedejeanne
Copy link

Does anyone know if there is a actually PR for this issue? If yes, please link it here.

The state "In Review" means that there is a PR, but it seems to me that this issue needs further discussion and should be moved to "New" until a decision on how to proceed has been made.

WDYT @akoch-yatta / @HeikoKlare ?

@HeikoKlare
Copy link
Contributor

eclipse-platform/eclipse.platform.swt#1401 is related to a different issue as it is supposed to replace the zoom value "correction" for non-image contexts and not to replace static usage of (native)DeviceZoom from DPIUtil, isn't it, @akoch-yatta?

@HeikoKlare
Copy link
Contributor

Next step: document and investigate usages of these methods

@fedejeanne
Copy link

@akoch-yatta , @amartya4256 did eclipse-platform/eclipse.platform.swt#1369 solve this issue or do we expect another PR to be necessary?

@HeikoKlare
Copy link
Contributor

Next step: document and investigate usages of these methods

@fedejeanne
Copy link

Next step: document and investigate usages of these methods

Yes, we discussed it yesterday

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HiDPI A HiDPI-Related Issue or Feature SWT Issue for SWT
Projects
Status: 🔖 Ready: Atomic
Development

Successfully merging a pull request may close this issue.

4 participants