New high DPI support in 5.4.0 renders a bit too large for me

Hi,

I use IoNinja on a 4k monitor with 150% scaling in Windows 10. For versions <= 5.3.2, this looks great. The toolbar buttons are around the same size as my taskbar's system tray icons, and the program is comfortable to use with the font size set to 10. The fonts in the toolbars and sidebars are a similar size to the serial port window. Everything renders clearly with no blurring.

In version 5.5.0 (I haven't tested 5.4.0), everything still renders clearly, but the toolbar and sidebar fonts are bigger than I'd like, and the toolbar icons are scaled much bigger than I'd like. To get the serial port window font to a comfortable size, I have to set the font size to 8. But this doesn't change the size of the toolbar and sidebar fonts. So the toolbars and sidebars take up very much screen space. I can get the size back to what's comfortable for me by changing the windows scaling settings in the application shortcut, but this makes the rendering blurry.

I'm switching back to version 5.3.2 for now.
Maybe in the future you can add an options for changing the toolbar and sidebar fonts sizes, and choosing the icon scaling size?

3fec8cb8-a941-479f-ab63-b0ac4405c90f-image.png

I did have some success using the QT_ENABLE_HIGHDPI_SCALING and QT_SCALE_FACTOR environment variables. Disabling scaling looked best (like before in version 5.3.2), while setting the scale factor looked just ok - fonts were a good size, but the icons don't like quite as nice as the unscaled versions.

Thanks for your feedback!

The high DPI support in IO Ninja depends on QT -- it's mainly about the version of QT IO Ninja is linked to. Before ioninja-5.4.0, we used qt-5.6 on Windows. qt-5.6 has very poor support for mixed-DPI setups. I know it might look OK on your monitor -- but try plugging your 4k into a laptop and setting 100% on laptop, 150% on the monitor. Drag IO Ninja from one monitor to the other, and you'll see that the visuals basically fall apart; there were glitches, overlapping, broken layouts, etc.

Now, we link to qt-5.15.10, which objectively has much (much!) better support for high DPI -- and mixed DPI configurations in particular. It's still not perfect yet, I must admit, but it's a huge step forward in this department. Also, QT gradually improving; they still keep releasing updates to QT5 (eventually, we will port things to QT6, of course) -- so it's reasonable to expect high DPI support to get better, as well.

The effect you mentioned (icons & toolbar looking too big) is due to the fact that the 150% scaling has its own quirks. It's next to impossible to automatically scale non-vector images nicely by the x1.5 factor. And QT doesn't even try to. If you change the Windows display scaling, you can notice that icons in 150% and 200% scaling are the same (scaled x2), while fonts are scaled differently. This causes certain distortions (and this "something's off" feeling about icons & toolbar). We can experiment with turning scaling off just for icons, but the ultimate solution is either (a) move to vector icons (probably not) or (b) provide multiple sets of icons for different scaling factors (x1, x1.5, x2). I can't promise to have these improvements in the very next release, but soon -- high DPI is getting more and more widespread.

Hope this clarifies the issue and makes sense.