stuerp / foo_midi

A foobar2000 component to play MIDI files.
MIT License
62 stars 1 forks source link

In version 2.8.0.0 incorrect resize of control's width #3

Closed serg-rsp closed 1 year ago

serg-rsp commented 1 year ago

In plugin version 2.8.0.0 have incorrectly resized controls in config popup dialog (outside of dialog) in case of Win11 DPI scale not equal 100%. On the image I have Win11 DPI scaling = 125% image

grimes2 commented 1 year ago

Happens also to me. Windows 11 Scaling 125% DPI.

stuerp commented 1 year ago

Any ideas on how to fix it? A manifest does not work. Windows resources don't seem to scale automatically (even though we have to use Device Independent Units, "...rolls eyes...") . Other components that use the full width of the dialog also have that problem (e.g. Open Lyrics)

grimes2 commented 1 year ago

Also here: https://hydrogenaud.io/index.php/topic,112381.msg1025805.html#msg1025805

serg-rsp commented 1 year ago

Any ideas on how to fix it? A manifest does not work. Windows resources don't seem to scale automatically (even though we have to use Device Independent Units, "...rolls eyes...") . Other components that use the full width of the dialog also have that problem (e.g. Open Lyrics)

I am not a coder in C++. Maybe here https://learn.microsoft.com/en-us/windows/win32/hidpi/declaring-managed-apps-dpi-aware https://mariusbancila.ro/blog/2021/05/19/how-to-build-high-dpi-aware-native-desktop-applications/

So it looks like issue of WHOLE application, not a plugin only

An application can run with one of four different DPI awareness modes:

grimes2 commented 1 year ago

foobar2000 is system aware.

serg-rsp commented 1 year ago

A-HA the bug can be workaround if apply Win10 application property -> settings - Compatibility - > Hi Dpi -> "System". But we get ugly font smooth effect over entire application dialog ((( So author of foobar2000 have to resolve this issue for any plugin dialog image

grimes2 commented 1 year ago

Confirmed, but foobar2000 fonts are blurry now.

stuerp commented 1 year ago

Fixed it. Apparently the combination of font parameters in the resource is very specific. Trial and error gave me a combination that works with different DPI's. I'll release a fix and wait for feedback before I close the issue.

grimes2 commented 1 year ago

Fix confirmed in 2.8.1.0. Thank you.

stuerp commented 1 year ago

Fixed in 2.8.1.0.