Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Qt5Agg HiDPI support#7507
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Qt5Agg HiDPI support#7507
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Seems to work nicely! |
There is a bug with |
QuLogic commentedNov 24, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'm not seeing the WebAgg backend (#5383) do anything to handle that either; is it really needed? |
The |
On resize events, we scale the logical pixels to physical pixels and then calculate inches via the scaled DPI, so I'm pretty sure Looking at the So I'm wondering whether this bug occurs withtrue HiDPI displays? Is it a bug in Qt or just Qt's |
The renderer and backing QPixmap use doubled (or whatever) pixels, butthe painter continues to use logical pixels for positioning.
FoundQTBUG-51899 andQTBUG-53389, so this is not a bug in the matplotlib code. |
This looks good. I am not very familiar with these backends, so another pair of eye should look at this PR. |
Works for me as expected. Would be cool to have this in the final v2.0 already. |
Tested it too and seems to work fine. The only question is if it's to late to merge into 2.0@tacaswell |
If the underlying canvas as a `_dpi_ratio`, scale the dpi beforecomputing the new size.
Uh oh!
There was an error while loading.Please reload this page.
This completes the work by@piannucci in#6389. Scaling is necessary on the figure DPI, and inverse scaling on rubberband and blitting locations.
I don't have a HiDPI display, but I tested by setting
QT_SCALE_FACTOR=2
. There is one bug with resizing if I use the grip in the status bar because it produces the wrong size. I'm not sure where that is created, so I haven't fixed it yet. Resizing using the OS's size works fine.Ping@tacaswell,@astrofrog,@adrn, and@jenshnielsen who appear to have HiDPI screens based on other issues.