api-issue-tracker icon indicating copy to clipboard operation
api-issue-tracker copied to clipboard

Apply DPI-scaling to extension cursors

Open Matherone opened this issue 3 years ago • 4 comments

To be able to discern cursors on high-resolution screens, users turn to their OS settings and dial up their DPI-scaling. This effectively grows cursors and other traditionally pixel-determined UI elements in relation to the viewport. Now, cursors become easily legible on screens say 4K and up.

DPI-scaling factors of 150%, 200% or 250% are not uncommon.

Currently, Sketchup correctly applies this OS-level DPI-scaling to native Sketchup cursors. This behaviour is expected and useful.

However, for extension cursors, it appears that Sketchup silently overrides, bypasses, ignores users' DPI-scaling setting. No matter whether the cursor is in *.png or *.svg. format. Simply because the cursor originates from an extension. This Sketchup behaviour is inconsistent, unexpected, and useless.

The result? A large and growing percentage of Sketchup users are expending effort squinting away at their expensive 4K and 5K screens trying to discern tiny differences among their ever-shrinking micro-cursors.

This is bad accessibility. But it is also needless. It could be easy to fix.

While this issue is related to the API, the API need not expose any new argument. Any DPI-scaling ought simply always be applied, at least for any SVG-format cursor. Just like it already works with native cursors.

• Would you please make Sketchup apply DPI-scaling also to our extensions' cursors?

Matherone avatar Aug 18 '22 12:08 Matherone

Thanks for logging this! I'll bring it up internally

Eneroth3 avatar Aug 18 '22 13:08 Eneroth3

Logged as: SKEXT-3505

sketchup[bot] avatar Sep 09 '22 11:09 sketchup[bot]

Musing ...

If this is a bug ... how is it going to be fixed, especially as UI.scale_factor is broken (see Issue 864.)

Would we need to have a new UI::create_scaled_cursor method so as not to cause weird behavior in extensions that had previously applied UI.scale_factor to their cursor's hotspot coordinates ?

Ie ...

if UI.respond_to?(:create_scaled_cursor)
  @id = UI.create_scaled_cursor(cursor_path, 31, 31)
else
  # Scale the hotspot
  r = UI.scale_factor
  x, y = 31 * r, 31 * r
  @id = UI.create_cursor(cursor_path, x, y)
end

DanRathbun avatar Jul 18 '23 12:07 DanRathbun

🎉Issue anniversary this week.

This Sketchup accessibility issue is priority for me.

To visually resolve the cursors we made for our clients, I see myself switching back from my seven-year-old 4K monitor to my fifteen-year-old monitor, because the latter is 2K. This can't be right.

Please reinstate cursor scaling parity between native and extensions.

• What is the state of progress for this issue?

Matherone avatar Aug 20 '23 18:08 Matherone

I'm using SVG/PDF cursors in both Vertex Tools and SUbD, I'm seeing the cursor scaling with the DPI. If I use my Surface laptop with 200% scaling the cursors appear as 64x64 instead of 32x32.

thomthom avatar Jul 09 '24 14:07 thomthom

This issue was resolved by the release of Sketchup 2024.

Extension cursors now seem to scale up just fine on my end, using Windows 11. Extension cursors are finally fully legible also on high-DPI screens. Thank you!

You may close this issue.

Matherone avatar Jul 10 '24 14:07 Matherone