-
-
Notifications
You must be signed in to change notification settings - Fork 449
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
Use Qt's High-DPI scaling on Windows #4868
Conversation
2636eeb
to
70dbcc5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
7ad307d
to
3428605
Compare
a9221a3
to
6523282
Compare
This reverts commit aa955d4.
Dragging Chatterino between two monitors with different scaling works fine for me on Windows 11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works much better on Windows now 👍
Description
This switches from manual DPI handling to Qt's DPI handling, as Qt 6 disabled the option to opt-out of high DPI scaling through application attributes. Although this PR mainly fixes Windows bugs, it should be tested on all platforms, as the changes will affect everyone.
Windows now mostly uses the display scaling other platforms used.
You can test the scaling for yourself by setting
QT_SCALE_FACTOR
to something other than 1.I'm waiting for #3690 to be merged, as that will fix some font-bugs (although I didn't see any on this branch).This PR should be merged first.I left out "fixes" for some issues, as they might persist on other platforms.
Stuff to test
One major thing to look out for is the size of the window reported to the OS. You can use something like ShareX to measure the size. Make sure the size is exact (not too large, not too small). Previously, the window was 1px too tall. Some of the testing might need to be done on Qt 5.15 or 6.7 (or later).