-
-
Notifications
You must be signed in to change notification settings - Fork 242
fix: make units and status bar readable on HiDPI monitor #232
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
fix: make units and status bar readable on HiDPI monitor #232
Conversation
Could you help me to find a way to test this (preferably on Windows)? What operating system (and GUI framework) do you use? I'm just a little hesitant to merge because I remember that we needed to put these |
I am using Ubuntu 22.04.03 LTS on 15 inch laptop screen with resolution 3840x2160. |
I have just added details about the current screen resolution and DPI to the logs, because I would like to have a solution that works great for all the users. Could you download the latest snapshot build, run it and send me the logs entries? It would be a great help for me, and then I could implement a universal, DPI-dependent solution for the next release. Thank you! |
Screen: 3840x2160, 97 DPI |
Thanks! I probably misunderstand something, but it looks to me that the reported DPI value is wrong either on my or on your machine. You have a 15-inch display at 3840x2160 with 97 DPI. But how? Shouldn't you have approximately 3 times as high DPI (because of the higher resolution and smaller size)? Wouldn't the DPI represent the pixel density? |
Interesting! We had a similar issue, but I'm not sure it was addressed properly. I also found a commit that affected these Min/Max/Preferred sizes: 44767c17990589c0dc90a3a55ed21c541b0a31ba All in all, I don't think we can rely on reported DPI, and the best solution would probably be yours: remove as many resolution specific constrains as possible. I will still do some tests on my system in the hope of reproducing your situation. |
Originally the window looks like this at 1080p: When I switch to 3840x2160 (on my small monitor) I got these: Your PR is definitely an improvement. The curious thing is that the font size in the menu bar seems to be fine, all the others are wrong. So, what I ended up doing is that I set the font size for all the UI components at startup manually and it seems to be working (at least on Windows with my resolutions). Could you try it as well? |
Before:

After:

Layouts auto size components to reasonable defaults anyway, there is no need to specify constraints in this particular case.