Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#18642 closed defect (invalid)

HiDPI scaling in AUI depends on Win10 setting "fix apps so they're not blurry"

Reported by: StepanHrbek Owned by:
Priority: normal Milestone:
Component: wxAui Version: dev-latest
Keywords: HiDPI Cc:
Blocked By: Blocking:
Patch: no

Description

On Win10, HiDPI scaling of many elements inside wxAUI panes is wrong. It can be worked around by checking Win10 checkbox "Settings / Display / Advanced scaling settings / Fix apps so they're not blurry".

I'm attaching two images of AUI sample that show the difference.

For reference, I started discussing it in
https://forums.wxwidgets.org/viewtopic.php?f=23&t=46699&p=196095#p196095

Attachments (2)

wx2.png download (85.0 KB) - added by StepanHrbek 7 months ago.
wx1.png download (155.9 KB) - added by StepanHrbek 7 months ago.

Download all attachments as: .zip

Change History (7)

Changed 7 months ago by StepanHrbek

Changed 7 months ago by StepanHrbek

comment:1 Changed 7 months ago by vadz

  • Keywords HiDPI added

There have been several fixes to high DPI support in wxAUI, but many more things remain to be fixed. I'm not sure if it's worth to have such an umbrella ticket as the individual problems are independent and we already have #18474. So it would probably be best to create tickets for each problem instead.

Here the most visible problem is #18564, and something is clearly wrong with the title bars. OTOH the icons are more blurry when you enable Windows scaling.

So AFAICS the real bug title should be "AUI title bars don't appear correctly when using high DPI", but please correct me if I'm missing something here.

comment:2 Changed 7 months ago by StepanHrbek

  • Cc wxwidgets@… added

Sorry for my bad bugreporting, I don't understand HiDPI internals, so I just stated fact that surprised me. With hope that someone with better understanding can use it to make wx less surprising.

If checking "fix apps so they're not blurry" is known requirement, it should be stated somewhere.

If it is not a requirement, is it at least known that wx depends on it?

I'm asking because wx is near perfect with "fix apps" ON, as if someone with "fix apps" ON did very good job testing and fixing nearly all issues. But he might not be aware of this setting, so he never tested with "fix apps" OFF, which is default.

comment:3 Changed 7 months ago by MaartenB

AUI is not yet per-monitor DPI aware. So if you switch the application between monitors with different DPI or change the DPI of a monitor (either while the application is running, or if you start the application after), it has problems.

The 'fix blurry apps' option does indeed fix some problems, but ideally this should be fixed in wxWidgets.

I do think it is high DPI aware. For example if you set it to 200%, log-out and log-in again, it should look fine. Also with 'fix blurry apps' off.

comment:4 Changed 7 months ago by StepanHrbek

  • Cc wxwidgets@… removed
  • Resolution set to invalid
  • Status changed from new to closed

Thanks! I have single monitor attached, so per-monitor was not the issue here. But I did not logout after change of scaling %. After logout/login, major problems disappeared, all looks good also with "fix apps" off.

So I'm closing this issue, but I would appreciate wxWidgets HiDPI page that would discuss these questions for others. Before starting HiDPI work, I scanned wiki and manual, without any results. I figured out what to do by trial and error. But this issue was too much. And I still don't understand the very basics. I made my own complex AUI app HiDPI aware without any single FromDIP(), I was thinking all scaling magically happens inside wxWidgets and it did work (sometimes after logout/login). So why is AUI sample so full of FromDIP()? Can extra code in app prevent logout/login issue?

comment:5 Changed 7 months ago by vadz

We don't document workarounds like "fix blurry apps" because they shouldn't be necessary once the remaining bugs are fixed. As for FromDIP(), you definitely should use it for any dimensions in pixels. However normally you shouldn't have (m)any such dimensions in your code in the first place and wxAUI might not be the best example to follow here.

Note: See TracTickets for help on using tickets.