Skip to content
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

Fix too large icon spacing in Qt5 on non-HiDPI screens #14509

Merged
merged 1 commit into from Jun 10, 2019

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented Jun 9, 2019

PR Summary

When using Qt5 on a non-HiDPI screen, the icons have too large spacing. This was explicitly hard-coded. While I don't have a full overview of the HiDPI mechanisms, the comment next to the code already suggests that it should not be applied if not on a HiDPI screen. Also the result justifies the change.

Not sure if this is related to #10891.

before:
image

after:
image

@tacaswell tacaswell added this to the v3.1.1 milestone Jun 10, 2019
@dstansby dstansby merged commit bccdf2e into matplotlib:master Jun 10, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jun 10, 2019
@timhoffm timhoffm deleted the fix-large-icons branch June 10, 2019 13:14
dstansby added a commit that referenced this pull request Jun 10, 2019
…509-on-v3.1.x

Backport PR #14509 on branch v3.1.x (Fix too large icon spacing in Qt5 on non-HiDPI screens)
@@ -709,7 +709,7 @@ def _init_toolbar(self):
# Esthetic adjustments - we need to set these explicitly in PyQt5
# otherwise the layout looks different - but we don't want to set it if
# not using HiDPI icons otherwise they look worse than before.
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this comment be removed then?

Copy link
Member Author

Choose a reason for hiding this comment

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

The comment is still valuable. The code now does what the comment specifies; and it's good to know why there is the hard-coding for HiDpi. Not sure though if the hard-coding is still necessary, but as long as the following if statement is there, the comment should stay.

Copy link
Member

Choose a reason for hiding this comment

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

Ah wait sorry, for some reason, I read the diff backwards. Never mind then.

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.

None yet

4 participants