Page MenuHomeSolus

Qt application scaling is wrong
Open, LowPublic

Description

Known Applications:

  • Calibre
  • Seafile client window is gigantic (outside my screen) on a 1920x1080 resolution. This makes it hard (impossible?) to resize the window. Running seafile 6.1.0.
  • Zeal
  • Ghostwriter

Event Timeline

tompa created this task.Aug 11 2017, 4:34 AM
DataDrake edited projects, added Software; removed Lacks Project.Aug 20 2017, 10:52 PM
tompa added a comment.Aug 21 2017, 7:48 AM

Some more info;

on my other desktop it looks Ok with the same resolution


Intel® Core™ i3-4010U CPU @ 1.70GHz × 4
Intel® Haswell Mobile


The one thats NOT Ok


Intel® Core™ i5-6200U CPU @ 2.30GHz × 4
Intel® HD Graphics 520 (Skylake GT2)


This issue is tracked here: https://github.com/haiwen/seafile-client/issues/809

The solution: https://github.com/haiwen/seafile-client/issues/809#issuecomment-320120202

I guess Solus devs could add the QT scaling lines to the seafile-applet launcher for the time being to make it work out of the box.

tompa added a comment.Aug 22 2017, 1:40 PM

This issue is tracked here: https://github.com/haiwen/seafile-client/issues/809
The solution: https://github.com/haiwen/seafile-client/issues/809#issuecomment-320120202
I guess Solus devs could add the QT scaling lines to the seafile-applet launcher for the time being to make it work out of the box.

Thanks anaknaga!

JoshStrobl renamed this task from Seafile client scaling is wrong to Qt application scaling is wrong.Oct 5 2017, 1:29 PM
JoshStrobl updated the task description. (Show Details)
JoshStrobl updated the task description. (Show Details)
JoshStrobl added a subscriber: yursan9.

Can somebody test this:

sudo eopkg rm qtstyleplugins --ignore-dependency

Reboot and then see what the scaling is like. Scaling seems fine

Still no go. The widget's scaling is still wrong.

ben added a subscriber: ben.Nov 9 2017, 8:39 PM

Try running with these env vars

QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_SCREEN_SCALE_FACTORS=2

If the font size is wrong, run xrdb -merge <(echo 'Xft.dpi: 192')

In T4253#89272, @ben wrote:

Try running with these env vars

QT_AUTO_SCREEN_SCALE_FACTOR=0
QT_SCREEN_SCALE_FACTORS=2

If the font size is wrong, run xrdb -merge <(echo 'Xft.dpi: 192')

Thanks for this Ben. It does work for all qt applications. However, sadly it also makes font rendering within pdf files in Okular really bad. The scaling and fonts of the programme itself is ok, but not of the pdfs... Any tips much appreciated as I use Okular daily for work.

Yeah you need to set this for every application. I have the same issue with my XPS 13 (13,3" with 1920 x 1080 px) and if you sent the env vars it messes with other apps like VirtualBox. What I did was including it in the *.desktop file for every program:

[Desktop Entry]
Name=Seafile
Comment=Seafile desktop sync client
TryExec=seafile-applet
Exec=env QT_AUTO_SCREEN_SCALE_FACTOR=0 seafile-applet
Icon=seafile
Type=Application
Categories=Network;FileTransfer;

Of course this gets over-written with every update... Maybe we should ship some Qt apps with the modified desktop file, but I don't think that is a good idea. Fedora patched Qt a bit, but I can't find the actual patch: https://bugzilla.redhat.com/show_bug.cgi?id=1381828#c40

Yeah I used to do that, but it's a bit annoying. If you want to avoid updates messing with it, you can put a modified desktop file in ~/local/share/applications, so they will persist.

siru added a subscriber: siru.Nov 11 2017, 9:35 PM
ben added a comment.Nov 12 2017, 11:32 PM

you can place global environment variables in /etc/environment

As far as I know, Solus doesn't support display scaling on X11 - so it might be a sane default to set this enviromental variable QT_AUTO_SCREEN_SCALE_FACTOR=0 to deactivate Qt Autoscaling as described in this Qt Blog entry globally.
Issue also mentioned here and here.

Temporary fix:

  • create a folder called 'profile.d' in /etc
  • create a file with .sh extension (name doesn't matter) in which you put: 'export QT_AUTO_SCREEN_SCALE_FACTOR=0'
  • Log out or reboot and everything should be fine
MJ added a subscriber: MJ.Jul 27 2018, 4:51 PM

I was having the same issue with VLC and qBittorrent but vincentvega's fix seems to be working fine, thanks!

DataDrake triaged this task as Low priority.Oct 16 2018, 5:13 PM
DataDrake moved this task from Backlog to Package Fixes on the Software board.
so-lo added a subscriber: so-lo.Dec 25 2018, 8:23 PM

Any chance this could be fixed in the Solus packages for the time being? The Calibre UI can be brought to look normal by setting Adjust for high resolution screens to off in the preferences. However, the default upscaled UI was near unusable for me.