Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0f2979b

Browse filesBrowse files
committed
Fix NavigationToolbar2QT height
1 parent 804d32e commit 0f2979b
Copy full SHA for 0f2979b

File tree

Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-7
lines changed

‎lib/matplotlib/backends/backend_qt5.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt5.py
+7-7Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.