Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Qt5: Fix event positions on HiDPI screens. #8144

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

Merged
merged 1 commit into from
Mar 15, 2017

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Feb 24, 2017

The event location is in logical pixels, which is the way it should stay for the rest of the stack.

Fixes #8052.

@QuLogic QuLogic added this to the 2.0.1 (next bug fix release) milestone Feb 24, 2017
Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Is it documented somewhere that fig.bbox.height is in physical pixels, not device-independent pixels? Should we try to change that?
  2. Either way, it'd be nice to add a docstring to the method to document this subtlety.

@QuLogic
Copy link
Member Author

QuLogic commented Feb 26, 2017

figure.bbox.height comes from figsize * dpi and for hidpi, dpi is scaled up by whatever the ratio is so that the figure is rendered at high resolution.

The event location is in logical pixels, which is the way it should stay
for the rest of the stack.
@QuLogic
Copy link
Member Author

QuLogic commented Feb 26, 2017

Added a comment about it in the docstring.

@anntzer anntzer changed the title Qt5: Fix event positions on HiDPI screens. [MRG+1] Qt5: Fix event positions on HiDPI screens. Feb 26, 2017
@NelleV NelleV merged commit 415d39a into matplotlib:v2.0.x Mar 15, 2017
@QuLogic QuLogic deleted the qt5-hidpi-fixes branch March 15, 2017 19:23
@QuLogic QuLogic changed the title [MRG+1] Qt5: Fix event positions on HiDPI screens. Qt5: Fix event positions on HiDPI screens. Mar 15, 2017
@QuLogic QuLogic mentioned this pull request Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants