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

Adapt win32 theme calls to use dpi dependent variants #102

Open
akoch-yatta opened this issue Jul 19, 2024 · 3 comments
Open

Adapt win32 theme calls to use dpi dependent variants #102

akoch-yatta opened this issue Jul 19, 2024 · 3 comments
Assignees
Labels
Enhancement A Request for an Enhancement of an Existing Feature HiDPI A HiDPI-Related Issue or Feature SWT Issue for SWT

Comments

@akoch-yatta
Copy link

akoch-yatta commented Jul 19, 2024

There is already an old branch, that should be doing most of it. But it needs to be retested. https://github.com/akoch-yatta/eclipse.platform.swt/tree/use-dpi-dependent-win32-api-calls

One old issue was positioning of text in the menu items in the menu bar. If the menu bar is not on the primary monitor they will either be too high to or too low´. One proabable solution could be:

  1. Do not forward text to the OS in this case in MenuItem::setText
  2. Draw the text directly via the GC similar to the drawing of the image in MenuItem::wmDrawChild
    You can check whether the parent Menu has custom drawing enable with Menu::needsMenuCallback
@akoch-yatta akoch-yatta converted this from a draft issue Jul 19, 2024
@akoch-yatta akoch-yatta added SWT Issue for SWT HiDPI A HiDPI-Related Issue or Feature Enhancement A Request for an Enhancement of an Existing Feature labels Jul 19, 2024
@akoch-yatta akoch-yatta moved this from 🆕 New to 🔖 Ready: Atomic in Eclipse Jul 19, 2024
@akoch-yatta
Copy link
Author

Master does now contain the neccessary win32 API calls, so I rebased the branch mentioned above onto master.

@ShahzaibIbrahim ShahzaibIbrahim self-assigned this Jul 24, 2024
@ShahzaibIbrahim ShahzaibIbrahim moved this from 🔖 Ready: Atomic to 🏗 In Work: Long in Eclipse Jul 24, 2024
@ShahzaibIbrahim ShahzaibIbrahim moved this from 🏗 In Work: Long to 👀 In Review in Eclipse Aug 14, 2024
@ShahzaibIbrahim
Copy link

@akoch-yatta
Copy link
Author

eclipse-platform/eclipse.platform.swt#1506 solves the rest of this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A Request for an Enhancement of an Existing Feature HiDPI A HiDPI-Related Issue or Feature SWT Issue for SWT
Projects
Status: Done
Development

No branches or pull requests

2 participants