-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
UI: Enable high DPI scaling, for Qt >= 5.6 #1602
Conversation
I tried following an online guide to squashing, but it just messed things up. Deleted the branch and pull request, and started over. |
This used to be in the program (#650) but it was reverted (06894c6, fa0bd58) due to some unexpected behavior that it caused with things like weird title bar heights and not handling monitors with different DPIs well. It's possible things have been improved since then but we'll want to test this pretty thoroughly. |
Are there any bug reports associated with those reverts? I'd be willing to re-test, if I had some specifics. |
Unfortunately I don't think there were any formal bug reports, just an observation and confirmation on IRC. There may be others who can be more specific? @DDRBoxman |
There are weird things like moving between monitors with different DPIs where the titlebar will be the wrong size. I honestly don't remember the other issues, the title bar mostly stood out. But a multi DPI environment on windows will suss most of them out. |
I don't know if my test environment exactly replicates the environment you're talking about. I have two monitors (the same size), and in the Windows 10 display settings, I set the scaling to 100% on one, and 225% on the other. I then tested Qt 5.6, 5.10.1, and 5.12. I tried all four themes. I dragged the OBS window back and forth between the monitors. I tried with and without high DPI enabled in Qt. I can say that in all cases, having high DPI option enabled in Qt resulted in DRASTICALLY better results. With high DPI not enabled, I would get very odd UI behavior going back and forth. With it enabled, all those issues went away. Maybe some changes to OBS have been made since then that helps this situation. All I know is, I have yet to find a scenario where enabling high DPI makes things worse. So far, it has always made things better. Of course, YMMV. I'm willing to try other testing scenarios if you like. |
You need to test it on W7 too because of default DPI Awareness Level for Qt application. (if anybody uses W7) |
@@ -1645,7 +1645,9 @@ static int run_program(fstream &logFile, int argc, char *argv[]) | |||
profile_register_root(run_program_init, 0); | |||
|
|||
ScopeProfiler prof{run_program_init}; | |||
|
|||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) |
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.
Update this to 5, 11 I've tested the behavior on that QT version and can verify that it works okay. But I know for a fact that some older QT versions don't have all the proper DPI stuff on windows.
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.
@DDRBoxman , It is not needed. Or you wish to solve all Qt bugs manually? Option introduced in Qt 5.6.0.
Qt 5.11.2 (and 5.12.0) for example has stylesheet bug with checked menus (when customized). Do you wish to fix it too with the custom painting for example?
Changing this in so that it will enable on qt 5.11 since older versions have some DPI related bugs. Next release will most likely not have this enabled yet as there are a few issues to fix. But once we use 5.11 or newer it should be good to go! Look for a5fac7d |
Was mentioned in: |
No description provided.