10000 Merge pull request #14697 from timhoffm/fix-qt5-navigationtoolbar-size · matplotlib/matplotlib@dcff0d2 · GitHub
[go: up one dir, main page]

Skip to content

Commit dcff0d2

Browse files
authored
Merge pull request #14697 from timhoffm/fix-qt5-navigationtoolbar-size
FIX: NavigationToolbar2QT height
2 parents a3825f4 + 0f2979b commit dcff0d2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/matplotlib/backends/backend_qt5.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -727,14 +727,14 @@ def buttons(self):
727727
def adj_window(self):
728728
return None
729729

730-
if is_pyqt5():
731-
# For some reason, self.setMinimumHeight doesn't seem to carry over to
732-
# the actual sizeHint, so override it instead in order to make the
733-
# aesthetic adjustments noted above.
734-
def sizeHint(self):
735-
size = super().sizeHint()
730+
def sizeHint(self):
731+
size = super().sizeHint()
732+
if is_pyqt5() and self.canvas._dpi_ratio > 1:
733+
# For some reason, self.setMinimumHeight doesn't seem to carry over
734+
# to the actual sizeHint, so override it instead in order to make
735+
# the aesthetic adjustments noted above.
736736
size.setHeight(max(48, size.height()))
737-
return size
737+
return size
738738

739739
def edit_parameters(self):
740740
axes = self.canvas.figure.get_axes()

0 commit comments

Comments
 (0)
0