FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix for PyQt5.7 support. by anntzer · Pull Request #6854 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
14 changes: 5 additions & 9 deletions lib/matplotlib/backends/backend_qt5.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -474,18 +474,18 @@ def __init__(self, canvas, num):

self.window._destroying = False

# add text label to status bar
self.statusbar_label = QtWidgets.QLabel()
self.window.statusBar().addWidget(self.statusbar_label)

self.toolbar = self._get_toolbar(self.canvas, self.window)
if self.toolbar is not None:
self.window.addToolBar(self.toolbar)
self.toolbar.message.connect(self._show_message)
self.toolbar.message.connect(self.statusbar_label.setText)
tbs_height = self.toolbar.sizeHint().height()
else:
tbs_height = 0

# add text label to status bar
self.statusbar_label = QtWidgets.QLabel()
self.window.statusBar().addWidget(self.statusbar_label)

# resize the main window so it will display the canvas with the
# requested size:
cs = canvas.sizeHint()
Expand All @@ -507,10 +507,6 @@ def notify_axes_change(fig):
self.canvas.figure.add_axobserver(notify_axes_change)
self.window.raise_()

@QtCore.Slot()
def _show_message(self, s):
self.statusbar_label.setText(s)

def full_screen_toggle(self):
if self.window.isFullScreen():
self.window.showNormal()
Expand Down

Back | FazBrowse Home | New Git URL