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 163cf66

Browse filesBrowse files
authored
Merge pull request #7610 from QuLogic/qt5-sizing
FIX: Force Qt5 toolbar minimum height to 48.
2 parents 5a3c796 + 1180f3a commit 163cf66
Copy full SHA for 163cf66

File tree

Expand file treeCollapse file tree

1 file changed

+9
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-1
lines changed

‎lib/matplotlib/backends/backend_qt5.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt5.py
+9-1Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,15 @@ def _init_toolbar(self):
611611
if is_pyqt5():
612612
self.setIconSize(QtCore.QSize(24, 24))
613613
self.layout().setSpacing(12)
614-
self.setMinimumHeight(48)
614+
615+
if is_pyqt5():
616+
# For some reason, self.setMinimumHeight doesn't seem to carry over to
617+
# the actual sizeHint, so override it instead in order to make the
618+
# aesthetic adjustments noted above.
619+
def sizeHint(self):
620+
size = super().sizeHint()
621+
size.setHeight(max(48, size.height()))
622+
return size
615623

616624
def edit_parameters(self):
617625
allaxes = 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.