Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window scaling issue on Linux and Windows #367

Open
marshuang80 opened this issue Jun 25, 2019 · 9 comments
Open

Window scaling issue on Linux and Windows #367

marshuang80 opened this issue Jun 25, 2019 · 9 comments

Comments

@marshuang80
Copy link
Contributor

@marshuang80 marshuang80 commented Jun 25, 2019

馃悰 Bug

The drop down menu has scaling issues on linux
image

To Reproduce

Run python examples/labels-0-2d.py and expand drop down menu for segmentation

Environment

  • napari: 0.9
  • Linux Ubuntu 18.04LTS
  • Python version: 3.7
  • Laptop: Lenovo X1 Carbon 6th gen
@sofroniewn sofroniewn added the bug label Jun 25, 2019
@sofroniewn sofroniewn added this to To do in Stylings and interactivity via automation Jun 25, 2019
@sofroniewn sofroniewn added this to the 0.1.0 milestone Jun 25, 2019
@sofroniewn

This comment has been minimized.

Copy link
Contributor

@sofroniewn sofroniewn commented Jun 25, 2019

Nice catch @marshuang80 - this is probably because we are hard coding a size for the expanded properties widget, but we might need to make it depend on things like screen resolution etc. I can look into it further.

In general we need to do a bit more testing of our stylings on linux and windows!

@jni

This comment has been minimized.

Copy link
Contributor

@jni jni commented Jun 26, 2019

Note that I haven't run into these issues, and probably has to do with GNOME scaling on 2x (retina/HiDPI) displays (I don't have that turned on because I'm on i3).

It's very interesting that the layer name text is not scaled but all the other text is 鈥 that might be a hint about what "correct" styling looks like. Incidentally, I think the rest of the chrome should be doubled, rather than the text be made smaller 鈥 the window title text is a good guide.

@marshuang80

This comment has been minimized.

Copy link
Contributor Author

@marshuang80 marshuang80 commented Jul 2, 2019

Seems like this issue only happens when the display on linux is scaled to anything larger than 100%.

image

@jni

This comment has been minimized.

Copy link
Contributor

@jni jni commented Sep 13, 2019

As noted by @hmaarrfk in #530, his library might be a good way to deal with this issue:

https://github.com/hmaarrfk/qtpy-tools

@sofroniewn

This comment has been minimized.

Copy link
Contributor

@sofroniewn sofroniewn commented Sep 13, 2019

@hmaarrfk any PRs around this would be great, @marshuang80 and I found some settings that might have helped but couldn't quite get it working

@hmaarrfk

This comment has been minimized.

Copy link

@hmaarrfk hmaarrfk commented Sep 13, 2019

I've never coded up qt, just converted the UI files into py files with the qt tools. I typically do that step at build time.

@sofroniewn

This comment has been minimized.

Copy link
Contributor

@sofroniewn sofroniewn commented Sep 13, 2019

Ok, I'll try and look into this again soon

@sofroniewn sofroniewn modified the milestones: 0.1.0, 0.2.0 Oct 6, 2019
@sofroniewn sofroniewn mentioned this issue Oct 26, 2019
10 of 10 tasks complete
@jni jni changed the title Window scaling issue on Linux Window scaling issue on Linux and Windows Nov 19, 2019
@jni

This comment has been minimized.

Copy link
Contributor

@jni jni commented Nov 19, 2019

For Windows, an image.sc user found a fix:

https://forum.image.sc/t/napari-issues-it-works-but-no-gpu-and-the-gui-is-all-squashed/31411/13

It would be great if we could figure out how to find that setting programmatically...

@sofroniewn

This comment has been minimized.

Copy link
Contributor

@sofroniewn sofroniewn commented Dec 14, 2019

I wonder if Qt::AA_EnableHighDpiScaling and Qt::AA_DisableHighDpiScaling - see https://doc.qt.io/qt-5/qt.html#ApplicationAttribute-enum might be important settings here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4 participants
You can鈥檛 perform that action at this time.