Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
efiring merged 6 commits intomatplotlib:v2.xfromQuLogic:qt5agg_hidpi
Jan 2, 2017
Merged

Qt5Agg HiDPI support#7507

efiring merged 6 commits intomatplotlib:v2.xfromQuLogic:qt5agg_hidpi
Jan 2, 2017

Conversation

QuLogic
Copy link
Member

@QuLogicQuLogic commentedNov 24, 2016
edited
Loading

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 settingQT_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.

astrofrog reacted with hooray emoji
@QuLogicQuLogic added this to the2.0.1 (next bug fix release) milestoneNov 24, 2016
@astrofrog
Copy link
Contributor

Seems to work nicely!

@tacaswell
Copy link
Member

There is a bug withfig.set_size_inches, it uses the scaled DPI to resize the canvas.

@QuLogic
Copy link
MemberAuthor

QuLogic commentedNov 24, 2016
edited
Loading

I'm not seeing the WebAgg backend (#5383) do anything to handle that either; is it really needed?

@tacaswell
Copy link
Member

Theset_size_inches bug is probably related to the mouse-resize issue?

@QuLogic
Copy link
MemberAuthor

On resize events, we scale the logical pixels to physical pixels and then calculate inches via the scaled DPI, so I'm pretty surefig.set_size_inchesshould use the scaled DPI.

Looking at theresizeEvent inFigureCanvasQT, 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 withtrue HiDPI displays? Is it a bug in Qt or just Qt'sQT_SCALE_FACTOR?

@QuLogic
Copy link
MemberAuthor

FoundQTBUG-51899 andQTBUG-53389, so this is not a bug in the matplotlib code.

@QuLogicQuLogic changed the titleQt5Agg HiDPI support[MRG] Qt5Agg HiDPI supportDec 1, 2016
@NelleVNelleV changed the title[MRG] Qt5Agg HiDPI support[MRG+1] Qt5Agg HiDPI supportDec 30, 2016
@NelleV
Copy link
Member

This looks good. I am not very familiar with these backends, so another pair of eye should look at this PR.

@MAKOMO
Copy link
Contributor

Works for me as expected. Would be cool to have this in the final v2.0 already.

stonebig reacted with thumbs up emoji

@jenshnielsen
Copy link
Member

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.
@efiringefiring merged commita468e31 intomatplotlib:v2.xJan 2, 2017
@tacaswelltacaswell modified the milestones:2.0 (style change major release),2.0.1 (next bug fix release)Jan 2, 2017
@QuLogicQuLogic deleted the qt5agg_hidpi branchJanuary 4, 2017 00:20
@QuLogicQuLogic changed the title[MRG+1] Qt5Agg HiDPI supportQt5Agg HiDPI supportJan 4, 2017
@anntzeranntzer mentioned this pull requestDec 13, 2017
6 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@NelleVNelleVNelleV approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
v2.0.0
Development

Successfully merging this pull request may close these issues.

8 participants
@QuLogic@astrofrog@tacaswell@NelleV@MAKOMO@jenshnielsen@efiring@piannucci

[8]ページ先頭

©2009-2025 Movatter.jp