Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

GUi scaling with hires displays #705

Open
mkolar opened this issue Nov 11, 2020 · 13 comments
Open

GUi scaling with hires displays #705

mkolar opened this issue Nov 11, 2020 · 13 comments
Assignees
Labels
type: bug Something isn't working

Comments

@mkolar
Copy link
Member

mkolar commented Nov 11, 2020

Describe the bug
All of our GUIs don't scale correctly on high-resolution monitors. The text gets so small, that It's pretty much unusable. For me in particular it's happening on 4k 15 inch laptop.

To Reproduce
Run Pype on 4k monitor and squint your eyes.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Desktop:

  • OS: windows
@mkolar mkolar added the type: bug Something isn't working label Nov 11, 2020
@FuzzkingCool
Copy link

Theres a whole chat about this some time ago in the discord channel. I found some good resources there. Also I use this for the moment:

Set env var:
QT_AUTO_SCREEN_SCALE_FACTOR = 1

Which has solved most issues on my 4k laptop screen with Pype UI.

@iLLiCiTiT
Copy link
Member

iLLiCiTiT commented Nov 17, 2020

Setting globally variable QT_AUTO_SCREEN_SCALE_FACTOR = 1 is one possible solution.

  • That has no affect in Maya. Maya's gui itself works fine but widgets don't.
  • Nuke (tested v11.2v2) on the other hand does not support 4k at all, I think it is impossible to work in nuke and having 4k resolution at the same time.
    • setting the environment in Nuke makes it "closer" how it should look but breaks node graph and viewer
  • not sure how that would affect other host with qt like houdini or

Conclusion

To "fix" tray and non-python hosts it is possible to do and it's easy (with or without the environment).
In python +qt hosts like Maya it will be harder. To fix (at least) the font size we can change px in stylesheets to pt so it should scale automatically, that requires to find out matching size and then test if it won't break style in any other hosts.

EDITED

I think maya has different stylesheet for each scales as when moved maya opened on 4k monitor to HD, scale won't change. Which is I think due to limitations of old PySide2. So changing font to points should be enough. What is broken are widget sizes as they are hardcoded (in pixels).
image

@FuzzkingCool
Copy link

@iLLiCiTiT
Copy link
Member

@karmakat i know about https://doc.qt.io/qt-5/highdpi.html I've read it many times. But that's not in maya or nuke (don't know if houdini, resolve, et.c have it).

@jrsndl
Copy link
Collaborator

jrsndl commented Nov 24, 2020

Hi,
in Nuke, the QT_AUTO_SCREEN_SCALE_FACTOR is working for 12.1 and up (win and linux, mac is special...)
I am not sure if it works with earlier versions
hth

@iLLiCiTiT
Copy link
Member

I am not sure if it works with earlier versions

Good to know that at least from Nuke 12 it works :) In Nuke 11 are viewer and node graph broken.

@mkolar
Copy link
Member Author

mkolar commented Dec 2, 2020

"QT_AUTO_SCREEN_SCALE_FACTOR": "1" is working reasonably well for now. I'll leave this open on low priority for now, so we can potentially gather more problem in various hosts, but the immediate problem of pulling my hair out is solved ;)

@mkolar
Copy link
Member Author

mkolar commented Jun 1, 2021

fixed for now with "QT_AUTO_SCREEN_SCALE_FACTOR": "1" variable in 3.0

@mkolar mkolar closed this as completed Jun 1, 2021
@antirotor antirotor reopened this Nov 15, 2023
@antirotor
Copy link
Member

This is unfortunately still an issue:

image

on high dpi display

image

on "standard" HD.

@BigRoy
Copy link
Collaborator

BigRoy commented Nov 15, 2023

@antirotor could you report what Qt version you checked with?
And is this Windows?

Is this standalone loader? or using inside a particular host (and thus possibly using a different Qt version and/or different Qt vars from the host)

@antirotor
Copy link
Member

This is Maya 2024 on Windows, Qt from Maya - 5.15.2, on 3200x2000 display set with 200% scaling and 1920x1200 set with 100%

@BigRoy
Copy link
Collaborator

BigRoy commented Nov 15, 2023

This is Maya 2024 on Windows, Qt from Maya - 5.15.2, on 3200x2000 display set with 200% scaling and 1920x1200 set with 100%

Can you reproduce the issue in standalone loader from Tray? It might be Maya-specific

@antirotor
Copy link
Member

standalone tools like tray publisher and loader are OK, just Maya and Max so far. Nuke works fine too. We are setting:

QT_API: pyside2
QT_AUTO_SCREEN_SCALE_FACTOR: 1
QT_D3DCREATE_MULTITHREADED: 1
QT_ENABLE_HIGHDPI_SCALING: 0
QT_MAC_DONT_OVERRIDE_CTRL_LMB: 1
QT_PREFERRED_BINDING: PySide2

"vanilla" maya has just:

QT_D3DCREATE_MULTITHREADED: 1
QT_ENABLE_HIGHDPI_SCALING: 0
QT_MAC_DONT_OVERRIDE_CTRL_LMB: 1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants