Skip to content

Commit bccdf2e

Browse files
authored
Merge pull request #14509 from timhoffm/fix-large-icons
Fix too large icon spacing in Qt5 on non-HiDPI screens
2 parents fac4ad5 + df183df commit bccdf2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_qt5.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ def _init_toolbar(self):
709709
# Esthetic adjustments - we need to set these explicitly in PyQt5
710710
# otherwise the layout looks different - but we don't want to set it if
711711
# not using HiDPI icons otherwise they look worse than before.
712-
if is_pyqt5():
712+
if is_pyqt5() and self.canvas._dpi_ratio > 1:
713713
self.setIconSize(QtCore.QSize(24, 24))
714714
self.layout().setSpacing(12)
715715

0 commit comments

Comments
 (0)