Bug 447900 - Scaling Broken on Windows
Summary: Scaling Broken on Windows
Status: RESOLVED FIXED
Alias: None
Product: kdiff3
Classification: Applications
Component: application (other bugs)
Version First Reported In: 1.9.4
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: michael
URL:
Keywords:
: 435711 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-03 21:41 UTC by Charlie
Modified: 2023-04-22 20:04 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Incorrect Scaling (78.27 KB, image/png)
2022-01-03 21:41 UTC, Charlie
Details
Fix Scaling (1.21 MB, image/png)
2022-01-03 21:42 UTC, Charlie
Details
Correct Scaling (68.21 KB, image/png)
2022-01-03 21:42 UTC, Charlie
Details
High DPI Settings (77.47 KB, image/png)
2023-03-13 04:13 UTC, Charlie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie 2022-01-03 21:41:37 UTC
Created attachment 145094 [details]
Incorrect Scaling

Install latest version (note this issue has been true for all versions over the last year) of Kdiff3 on Windows on a machine with a high resolution monitor. For example, I am using a ThinkPad X1 Yoga gen 6 with a screen resolution of 3840x2400. The scaling factor is 300%.

When you open the app the menus are squished together and the toolbar is illegible. See screenshot.

To fix requires telling windows to take over scaling itself. This is done by right clicking the app in Windows explorer, selecting the compatibility tab and changing the high DPI settings. See screenshot.

Reopen Kdiff3. Now it renders correctly. See screenshot.

Would be nice if this worked automatically versus having to fix this manually.

Thanks!
Comment 1 Charlie 2022-01-03 21:42:10 UTC
Created attachment 145095 [details]
Fix Scaling
Comment 2 Charlie 2022-01-03 21:42:28 UTC
Created attachment 145096 [details]
Correct Scaling
Comment 3 michael 2022-06-22 21:52:32 UTC
The windows installer for 1.9.6 will set the compatibility flag "~ DPIUNAWARE" by default. That will enable scaling to work by default. Same as the setting shown.
Comment 4 Charlie 2023-01-20 04:28:05 UTC
I just tried the latest installe (kdiff3-1.10.0-windows-cl-64.exe although the reported version is 0.97.0), and still see the issue.

The problem with having windows override the hdpi setting is that when Kdiff3 opens up it is really really big and then it gets resized correctly. The whole process takes a about 1 second, but its kinda distracting.

Would it be possible to fix the underlying issue as opposed to working around it?
Comment 5 michael 2023-01-21 00:59:19 UTC
I now have a machine with a high resolution monitor so I can look into this further.
Comment 6 michael 2023-02-12 19:17:25 UTC
*** Bug 435711 has been marked as a duplicate of this bug. ***
Comment 7 michael 2023-02-12 19:20:10 UTC
Just submitted changes to master and 1.10 to turn Qt's scaling support by default. They also adjust default scaling behavior to match Qt6. Hopefully that resolves the issue.
Comment 8 Charlie 2023-02-21 04:00:02 UTC
Thanks Michael! Happy to test when there is a new build.

Sorry to ask a dumb question, but which commit is it (I'm looking at https://invent.kde.org/sdk/kdiff3/-/commits/master)?
Comment 9 michael 2023-02-21 23:12:31 UTC
e713c038 is the commit. See https://binary-factory.kde.org/job/KDiff3_Nightly_win64/ for daily builds from master.
Comment 10 Charlie 2023-03-13 04:13:20 UTC
Created attachment 157225 [details]
High DPI Settings
Comment 11 Charlie 2023-03-13 04:16:34 UTC
To follow up on this, the nightly seems to set Windows High DPI override settings. See screeenshot - the Override checkbox is enabled but also greyed out. So that is also the way I fixed previous builds.

So this does work which is great!

Are there plans for KDiff3 to natively support high dpi on windows without this override?
Comment 12 michael 2023-03-14 19:56:44 UTC
Try the next nightly we should be able to work with out the override now. The install was setting it as a provisional work around. KDiff3 now tells Qt to turn on HDPI support.
Comment 13 michael 2023-04-22 20:04:58 UTC
Feal free reopen if there are issues kdiff3 1.10.1 should now work without the override. Just going through some of the old bug reports.