Skip to content

Qt5: Fix event positions on HiDPI screens.#8144

Merged
NelleV merged 1 commit into
matplotlib:v2.0.xfrom
QuLogic:qt5-hidpi-fixes
Mar 15, 2017
Merged

Qt5: Fix event positions on HiDPI screens.#8144
NelleV merged 1 commit into
matplotlib:v2.0.xfrom
QuLogic:qt5-hidpi-fixes

Conversation

@QuLogic

@QuLogic QuLogic commented Feb 24, 2017

Copy link
Copy Markdown
Member

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

@anntzer anntzer left a comment

Copy link
Copy Markdown
Contributor

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

QuLogic commented Feb 26, 2017

Copy link
Copy Markdown
Member Author

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

QuLogic commented Feb 26, 2017

Copy link
Copy Markdown
Member Author

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