VirtualBox

Opened 7 years ago

Last modified 7 years ago

#16249 new defect

Qt frontend doesn't set HiDPI attributes

Reported by: Andreas Schneider Owned by:
Component: GUI Version: VirtualBox 5.1.10
Keywords: hidpi Cc:
Guest type: all Host type: other

Description

The VirtualBox Qt Frontend doesn't set HiDPI Qt attributes, so the the rendering on HiDPI display is horrible.

See the attached patch fixes the rendering of the management GUI. More details are at:

https://doc.qt.io/qt-5/highdpi.html

However the guest window still doesn't not render correctly. I think it uses images for that and needs to be adapted for that.

https://doc.qt.io/qt-5/qpainter.html#drawing-high-resolution-versions-of-pixmaps-and-images

So the attached patch is only half of the story.

Attachments (2)

vbox_hidpi_support.patch (1.2 KB ) - added by Andreas Schneider 7 years ago.
Enable HiDPI support for the frontent
virtualbox.png (475.8 KB ) - added by Andreas Schneider 7 years ago.
Screenshot showing the scaling issue in a Windows guest

Download all attachments as: .zip

Change History (9)

by Andreas Schneider, 7 years ago

Attachment: vbox_hidpi_support.patch added

Enable HiDPI support for the frontent

comment:1 by Andreas Schneider, 7 years ago

Well, the patch enables scaling for the Qt Frontend correctly. We do not want any scaling to the area where the guest is rendered. That's the missing part.

comment:2 by Dsen, 7 years ago

Hello,
Thanks for your report about this issue. It requires a bit of analysis first.
Which host (OS type and screen model, if that is separate monitor) are you using where you observe poor HiDPI scaling quality?
And where this quality is particularly poor? Application elements, icons or VM guest screen itself?
Is it the default HiDPI scaling ratio for your host or you had selected some advanced option?

comment:3 by Andreas Schneider, 7 years ago

Hi,

this happens on openSUSE 42.2 or openSUSE Tumbleweed (Linux). The desktop environment is latest stable KDE. I have a Eizo EV3237 with 3180x2160 resolution. Fonts DPI is set to 144. I use a scaling factor of 1.4.

The issue is the Guest window. I'm not able to click on the Guest window menu bar. It is also hard to click something in a guest itself. Often I need a double click where a normal click would be enough. The guest OS doesn't matter.

I will attach a screenshot. You can see that the Windows guest has steps in the fonts. The smaller the font the harder to read it. The attached screenshot shows a Windows Server screen before log in.

Last edited 7 years ago by Andreas Schneider (previous) (diff)

by Andreas Schneider, 7 years ago

Attachment: virtualbox.png added

Screenshot showing the scaling issue in a Windows guest

comment:4 by Michael Thayer, 7 years ago

Please see also #16271.

comment:5 by Andreas Schneider, 7 years ago

The issue still exists with VirtualBox 5.1.12

comment:6 by Eric Work, 7 years ago

The issue still exists in VirtualBox 5.1.14 but that's probably expected. The workaround I'm using for now is to unscale the UI so that it's rendered at native resolution and then use the guest OS features, such as UI scaling in Windows or DPI in Ubuntu, to make it larger. Technically I add an export to the launcher script but it's the same idea.

env QT_SCALE_FACTOR=0.5 VirtualBox

I'm running Fedora 25, Xorg, NVIDIA, GNOME 3, with a 28" Samsung UHD monitor. I run both an Ubuntu 14.04.5 guest and a Windows 10 RS1 guest.

comment:7 by Eric Work, 7 years ago

A similar issue was just fixed in VLC. See https://trac.videolan.org/vlc/ticket/17484

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use