High DPI breaks the interface

Please let our ADS show!

This sites offers only FREE software and it's supported by a few advertisement boxes (no intrusive popups).
Please:

  • disable your AdBlocker by adding CoolSoft website to whitelist
  • give the proper cookie consent
  • enable JavaScript for this website

This seconds wait is to let you update your browser configuration...

Ok, I've done the required changes... now show me your content!
!!! Please enable JavaScript !!!

Pagine

Posts: 21
Joined: 1 Feb 2021 - 14:42
High DPI breaks the interface

The interface for both the main program and the the midi mixer become almost unusable on high DPI. This is perhaps the most serious bug and I should have reported it sooner. My resolution is 2560 x 1440 and my DPI is set to 200% under display setting, scale and layout.

Overriding the DPI with windows (right click, properties, compatibility, change high DPI settings) helps make it more readable but if you click on and drag the windows it disappears from the desktop all together.

Posts: 1764
Joined: 25 Mar 2012 - 01:19
Re: High DPI breaks the interface

The hardest thing for me is to be able to reproduce the bug on my side, since I don't have a 4k display available to test it.
Wiill check if the same bug happens at 1920x1080 but 200% DPI...

Posts: 21
Joined: 1 Feb 2021 - 14:42
Re: High DPI breaks the interface
coolsoft wrote:

The hardest thing for me is to be able to reproduce the bug on my side, since I don't have a 4k display available to test it.
Wiill check if the same bug happens at 1920x1080 but 200% DPI...

Ah right, if you're using an Nvidia graphics card you can fake 2k and 4k resolutions by using something called DSR (dynamic super resolution) you can turn it on through the Nvidia control panel. This will emulate higher resolutions for you; allowing you to test compatibility with scaling.

Posts: 21
Joined: 1 Feb 2021 - 14:42
Re: High DPI breaks the interface
coolsoft wrote:

The hardest thing for me is to be able to reproduce the bug on my side, since I don't have a 4k display available to test it.
Wiill check if the same bug happens at 1920x1080 but 200% DPI...

How did it go? Any news?

Posts: 1764
Joined: 25 Mar 2012 - 01:19
Re: High DPI breaks the interface

I was able to emulate an HiDPI environment in VirtualBox by forcing an available SGVA resolution through the command line.

That said, now comes the hard part: each custom paint must be rewritten with scaling in mind; and doing this with Win32 API is a nightmare 😢.
Think about the Mixer dialog: each element is a custom paint... knobs, texts, icons, leds.
Their position, which were constant till now, have to be recalculated each time DPI scaling changes (you could have two screens with two different scaling).

Well, I'm working on it but I'm sure it will be a long task 😉.

Posts: 21
Joined: 1 Feb 2021 - 14:42
Re: High DPI breaks the interface
coolsoft wrote:

I was able to emulate an HiDPI environment in VirtualBox by forcing an available SGVA resolution through the command line.

That said, now comes the hard part: each custom paint must be rewritten with scaling in mind; and doing this with Win32 API is a nightmare 😢.
Think about the Mixer dialog: each element is a custom paint... knobs, texts, icons, leds.
Their position, which were constant till now, have to be recalculated each time DPI scaling changes (you could have two screens with two different scaling).

Well, I'm working on it but I'm sure it will be a long task 😉.

Thanks, I'm just glad that I was abler to bring it to your attention.

Posts: 91
Joined: 25 Set 2013 - 16:38
Re: High DPI breaks the interface
coolsoft wrote:

I was able to emulate an HiDPI environment in VirtualBox by forcing an available SGVA resolution through the command line.

That said, now comes the hard part: each custom paint must be rewritten with scaling in mind; and doing this with Win32 API is a nightmare 😢.
Think about the Mixer dialog: each element is a custom paint... knobs, texts, icons, leds.
Their position, which were constant till now, have to be recalculated each time DPI scaling changes (you could have two screens with two different scaling).

Well, I'm working on it but I'm sure it will be a long task 😉.

Hi Claudio,

I think these are 2 different problems.
1. All non-HighDPI aware applications have the blurriness problem since the whole application is scaled by Windows as a bitmap by default. Overwriting your custom draw routines and declare your application as highDPI aware in manifest can solve this problem so your drawings and text will be clear. It's OK so far.

2. OP has been talking about a different problem. Namely when you try to move VMS dialogs/Mixer dialog on high DPI settings these dialogs move erraticly. They can even jump to offscreen poositions during moving. Notice that this problem is not related to problem 1.
There are many legacy non-highDPI aware applications that work correctly regarding moving dialogs. E.g. my Midi Player or your beloved Van Basco. They are only little blurry but they produce no erratic behavior when you move dialogs. You can check it.
So I do not think that rewriting your custom draw routines will necessarily solve this problem. You should check your mouse handling routines that interprete mouse movements instead.

Posts: 1764
Joined: 25 Mar 2012 - 01:19
Re: High DPI breaks the interface
falcosoft wrote:

1. All non-HighDPI aware applications have the blurriness problem since the whole application is scaled by Windows as a bitmap by default. Overwriting your custom draw routines and declare your application as highDPI aware in manifest can solve this problem so your drawings and text will be clear. It's OK so far.

Actually VMS is already (and wrongly) declared as HighDPI-aware. I've set it as a test some times ago and left it on by accident.
That's why Windows doesn't apply the well known bitmap-upscale workaround.
Not using a 4k screen I was not able to catch it... 😥

So, as a quick fix I'm going to set it back to non-DPI aware mode so Windows will "fix" it and make it usable on HiDPI screens (even if blurry).

Next I'll try to fix rendering but, as I said, it will require a lot of work because of the owner draw.
Drawing uses bitmap composition (expecially on Mixer dialog), so scaling them up won't give any better result than the default windows scaling.
I'll need to use bigger bitmaps and scale them down only, but still wonder how they'll appear on default 96dpi screens.
Best choice should be to switch to vector graphics (like SVG), but it's something I have few experience on.

falcosoft wrote:

2. OP has been talking about a different problem. Namely when you try to move VMS dialogs/Mixer dialog on high DPI settings these dialogs move erraticly. They can even jump to offscreen poositions during moving. Notice that this problem is not related to problem 1.
There are many legacy non-highDPI aware applications that work correctly regarding moving dialogs. E.g. my Midi Player or your beloved Van Basco. They are only little blurry but they produce no erratic behavior when you move dialogs. You can check it.
So I do not think that rewriting your custom draw routines will necessarily solve this problem. You should check your mouse handling routines that interprete mouse movements instead.

Yes, you're right.
I was able to reproduce it on my side, but only once 🙄.
Still have to find a reproducible way to raise the bug.

@Mintmag: maybe you could shot a short video of the bug and post it here.

Posts: 21
Joined: 1 Feb 2021 - 14:42
Re: High DPI breaks the interface
coolsoft wrote:

@Mintmag: maybe you could shot a short video of the bug and post it here.

I even had trouble with the recording software and I wasn't able to capture my whole desktop. Nonetheless I have footage of the bug in action for you.

https://drive.google.com/file/d/1TC2vd-vTR8fqox__xRY6Rmgcw_Fn5b-F/view?u...

Posts: 1764
Joined: 25 Mar 2012 - 01:19
Re: High DPI breaks the interface

I've watched the video, but can't get what's causing VMS windows to disappear...

Some questions:

  • I suppose you have a single-monitor environment, right?
  • if no, then do you have the same or different DPI on the 2 screens?
  • does the bug happen when you snap mixer window on desktop borders?
    If yes, does it still happen if you disable window snap option in VMS configuration?

Pagine