-
Notifications
You must be signed in to change notification settings - Fork 178
Caret scaling implemetation improvement on StyledText DPI change #2470
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
base: master
Are you sure you want to change the base?
Caret scaling implemetation improvement on StyledText DPI change #2470
Conversation
Test Results 485 files - 61 485 suites - 61 25m 28s ⏱️ - 6m 4s For more details on these failures and errors, see this check. Results for commit 396a9dc. ± Comparison against base commit f6de513. This pull request removes 91 tests.
♻️ This comment has been updated with latest results. |
This commit adds the usage of the new API SystemParametersInfoForDpi in Caret for resizing the caret and other places. contributes to eclipse-platform#62 and eclipse-platform#128
This commit adapts how StyledText handles the scaling of Caret with better platform independent APIs instead of utilizing win32 specific static methods. contributes to eclipse-platform#62 and eclipse-platform#128
6531eae
to
396a9dc
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.
Can you explain what changes when replacing the calls to SystemParametersInfo
to SystemParametersInfoForDpi
? I.e., what will be different both in terms of user experience and/or in terms of internal functionality when not doing the changes to the DPI change handling as well.
In addition, should be split this change up into replacing the existing calls and adapting the DPI change handling? I would also appreciate an explanation of why the method calls inside updateAndRefreshCarets()
have to be moved to understand what happens there.
It is already split. It depends on #2471. The new API is used to retrieve the system's preferred width for the cursor. Earlier, it used the system DPI aware value, which would always return the value for the first monitor on which the App was started on, could lead to the cursors looking too think or too wide. This kind of behaviour is although not always visible as mostly, all the monitors have the same width. With Per-monitor DPI aware API, we make sure that the retrieved width is specific to the current monitor's preference and doesn't appear too think or too flat. |
This PR improves the way carets of StyledText is scaled on DPI change event by utilizing APIs instead of win32 specific static methods.
contributes to #62 and #128
Depends on #2469 and #2471