Can you verify that this is not happening on MacOS ?
I.e., the AI tells me that the Mac does not have a compliment to Windows system text scaling.
Yes, I filed an issue report about this recently. It is due to a change in CEF behavior.
I think it started when SketchUp upgraded to CEF version 112. But, was partly bugged as SketchUp’s CEF dialogs received only the display scaling of the primary display, so could enlarge text and elements problematically.
SketchUp 2025 upgraded CEF to version 128 and now the HTML dialogs dynamically retrieve the correct display scaling for the display they are on … or moved to.
I do not see this in my testing.
- EDIT: (Sorry, I misread “>” as “==”)
- ADD: Yes, if the user has set the display (that the dialog is on) to scaling above 1.0 then you will see this reflected in the
window.DevicePixelRatio
value.
scale_factor_dialog.rb (2.1 KB)
First of all I have system text scaling set to 1.25.
Testing on SketchUp 2025 (CEF 128.4.12)
In the first test the test dialog opened on my external (primary) UHD display which I run SketchUp on. It is set to 1.5 display scaling.
HtmlDialogScale.dialog
#=> nil
UI Scale factor : 1.5
Text Scaling : 1.25
HTML devicePixelRatio : 1.875
devicePixelRatio / Text Scaling = 1.5
For the second test, I first dragged the dialog over to my internal (secondary) FHD display, (before closing it so it would reopen on that display,) which is set to 1.25 display scaling.
HtmlDialogScale.dialog
#=> nil
UI Scale factor : 1.5
Text Scaling : 1.25
HTML devicePixelRatio : 1.5625
devicePixelRatio / Text Scaling = 1.25
Notice that in both cases the UI scale factor is for the primary display. Ie, it is not valid in the second test for the internal (secondary) display that SketchUp is not on, but the dialog is.
So, on MS Windows and SketchUp 2025, from within the dialog you can calculate the correct display scaling, if you pass in the system text scaling and divide the window.devicePixelRatio
by it.
In other words … CEF is now multiplying the correct display scaling for the display the dialog is on, by the system text scaling when it calculates window.devicePixelRatio
.
Testing in SketchUp 2024 (CEF 112.3.0)
Both displays show that same results:
HtmlDialogScale.dialog
=> nil
UI Scale factor : 1.5
Text Scaling : 1.25
HTML devicePixelRatio : 1.875
devicePixelRatio / Text Scaling = 1.5
… which are incorrect on the secondary display because the dialog believes that display scaling is the same as the primary display monitor. It isn’t. This also leads to the incorrect calculation for display scaling because window.devicePixelRatio
is incorrectly calculated (as the same as on the primary display.)
So, SketchUp 2025 is better with both CEF 128 and the updates we got for Qt 6 that fixed the multi-monitor scenarios.