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

Skip to content

Commit df183df

Browse files
committed
Fix too large icons in Qt5 on non-HiDPI screens
1 parent efafb6c commit df183df

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)