| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Seems to work nicely! |
Sorry, something went wrong.
|
There is a bug with fig.set_size_inches, it uses the scaled DPI to resize the canvas. |
Sorry, something went wrong.
|
I'm not seeing the WebAgg backend (#5383) do anything to handle that either; is it really needed? |
Sorry, something went wrong.
|
The set_size_inches bug is probably related to the mouse-resize issue? |
Sorry, something went wrong.
|
On resize events, we scale the logical pixels to physical pixels and then calculate inches via the scaled DPI, so I'm pretty sure fig.set_size_inches should use the scaled DPI. Looking at the resizeEvent in FigureCanvasQT, I get logical sizes of ~480x80 when resizing using the OS handles. When using the grip in the toolbar, I get logical sizes of ~729x187, which aren't even double! I assume these values come directly from Qt as I see nothing else in the traceback. So I'm wondering whether this bug occurs with true HiDPI displays? Is it a bug in Qt or just Qt's QT_SCALE_FACTOR? |
Sorry, something went wrong.
The renderer and backing QPixmap use doubled (or whatever) pixels, but the painter continues to use logical pixels for positioning.
|
Found QTBUG-51899 and QTBUG-53389, so this is not a bug in the matplotlib code. |
Sorry, something went wrong.
|
This looks good. I am not very familiar with these backends, so another pair of eye should look at this PR. |
Sorry, something went wrong.
|
Works for me as expected. Would be cool to have this in the final v2.0 already. |
Sorry, something went wrong.
|
Tested it too and seems to work fine. The only question is if it's to late to merge into 2.0 @tacaswell |
Sorry, something went wrong.
If the underlying canvas as a `_dpi_ratio`, scale the dpi before computing the new size.
| Back | FazBrowse Home | New Git URL |
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.