nefarius / vicius

Nefarius' nŏvīcĭus universal software updater agent for Windows.
https://docs.nefarius.at/projects/Vicius
BSD 3-Clause "New" or "Revised" License
38 stars 3 forks source link

High-DPI environment doesn't apply to window size and coordinates #41

Closed jernejs closed 1 week ago

jernejs commented 2 weeks ago

I just got a notification "Updates for HidHide are available". There are two problems with this window:

  1. the window is tiny (looks like it's rendered at 96 DPI without scaling; my screens are set to 216 DPI)
  2. the window does not respond to clicks anywhere, though I can drag it around

image

According to Programs and Features I have HidHide 1.5.212 installed at the moment.

Steps to reproduce

Just wait for the updater window to appear

nefarius commented 2 weeks ago

Can't reproduce 😬

nefarius commented 2 weeks ago

The updater is indeed not DPI-aware, i wonder if I can trigger it if I fiddle around with my display scaling settings or is that something else? 🤔

nefarius commented 2 weeks ago

OK I did some digging and it appears that SFML needs to be configured properly to support DPI awareness and the developer has to react accordingly to scale everything. Interesting. @jernejs can you share your settings so I can replicate them, Screenshots or whatever shows how your monitor is set up.

jernejs commented 2 weeks ago

I've got two 27″ 5120x2880 monitors, both are set to 225% DPI in Windows; not sure if it matters, but I also use High Contrast mode. Here's a screenshot of my Display Settings: image

Also, I need to amend my report – after I sent the bug report, the updater started responding to clicks, though I have no idea why (I tried clicking everything first, including the Cancel button, but the only response was dragging the window when I did that near the top; dragging also wasn't working quite properly – it'd lose tracking fairly quickly; after I moved the window to the left side of my monitor, I noticed that "Display update details now" started responding to mouse hovering, after which I was able to click it and proceed with the update).

nefarius commented 2 weeks ago

Partially good news then. Still the DPI topic is on my TODO anyway.

nefarius commented 2 weeks ago

Some research resources:

nefarius commented 1 week ago

Also opened an issue about this over at imgui-sfml, fingers crossed 🤞

nefarius commented 1 week ago

Small progress but oh dear, what have I unleashed 🤯

image

nefarius commented 1 week ago

Another example implementation to look at 😃

nefarius commented 1 week ago

Progress! 🥳

Tested at 150%:

image

image

image

@jernejs once I have a test build would you be available to help testing with your system and give feedback about the look and feel?

jernejs commented 1 week ago

@jernejs once I have a test build would you be available to help testing with your system and give feedback about the look and feel?

Sure.

nefarius commented 1 week ago

@jernejs once I have a test build would you be available to help testing with your system and give feedback about the look and feel?

Sure.

Neat! So in case you already updated HidHide to the latest version, first run this in an elevated PowerShell/Terminal:

Set-ItemProperty -Path 'HKLM:\SOFTWARE\Nefarius Software Solutions e.U.\HidHide' -Name Version -Value "1.4.0" -Force

Next download and run this build and share screenshots and your opinion on how it scales, and maybe even a video clip of navigating through the pages.

Cheers

jernejs commented 1 week ago

Looks fine now: image image image

Also no problems with clicking the buttons, though trying to move the window still loses tracking sometimes.

nefarius commented 1 week ago

Very cool, thanks for testing! I will see if I can improve the dragging situation further.