-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Scaling issues with PyQt5 when using mixed resolution displays #8061
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Does Qt provide a signal we can hook into when the window changes screens (and hence the dpi scaling)? |
Looks like the easiest way is to look for screenChanged then in there check if devicePixelRatio changes: https://forum.qt.io/topic/52296/detect-changing-devicepixelratio/4 |
Note that this also causes issues when just showing a plot on the lower-res screen that is attached to a retina screen laptop (the fonts are two times too large and lines two times too thick) - that is, without even changing screen. I think this is something to do with the fact that the DPI device ratio is declared to be 1 for the low-res screen. If I force |
@QuLogic - do you have any ideas since you've worked on the DPI ratio stuff before? |
@astrofrog can you check with v2.0.1? |
@tacaswell - this is still an issue with 2.0.1 unfortunately |
It looks like you identified at least part of the machinery we need to add (screenChanged, etc.); any chance you can have a go at implementing it? |
All right, I'm going to take a look at this today. This has been bugging me for a while. Wish me luck. |
This bug report here describes two problems:
#8931 only fixes the first of the two issues. Should this bug report be reopened or a separate one be created? |
@burnpanck Can you make a new issue for the second? |
I have a set-up where I have a retina MBP (bottom) plugged in to a non-retina display (top).
Normally Matplotlib looks fine on retina or non-retina displays when used separately, but in the case of mixed resolutions, the fonts and the elements of the figure appear too large on the non-retina display. The following image sequence shows a matplotlib window that was created on the retina display and is then moved to the non-retina display. The same issue happens if I create the figure in the non-retina display to start with, so this is not about moving from one to the other.
I then click in the bottom right to resize the window:
The text was updated successfully, but these errors were encountered: