| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -550,23 +550,21 @@ def __init__(self, canvas, num): | |
| if self.toolbar: | ||
| backend_tools.add_tools_to_container(self.toolbar) | ||
| self.statusbar = StatusbarQt(self.window, self.toolmanager) | ||
| sbs_height = self.statusbar.sizeHint().height() | ||
| else: | ||
| sbs_height = 0 | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityTypo? Is this the same as sb_height? If so, please also make sure that the variable is set via all condition code paths. If not, can we make this variables more distinctive?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Qualityactually they should all be sbs_height, fixed
Sorry, something went wrong.
All reactions
|
||
|
|
||
| if self.toolbar is not None: | ||
| self.window.addToolBar(self.toolbar) | ||
| if not self.toolmanager: | ||
| # add text label to status bar | ||
| statusbar_label = QtWidgets.QLabel() | ||
| self.window.statusBar().addWidget(statusbar_label) | ||
| self.toolbar.message.connect(statusbar_label.setText) | ||
| tbs_height = self.toolbar.sizeHint().height() | ||
| else: | ||
| tbs_height = 0 | ||
|
|
||
| # resize the main window so it will display the canvas with the | ||
| # requested size: | ||
| cs = canvas.sizeHint() | ||
| sbs = self.window.statusBar().sizeHint() | ||
| height = cs.height() + tbs_height + sbs.height() | ||
| cs_height = cs.height() | ||
| height = cs_height + tbs_height + sbs_height | ||
| self.window.resize(cs.width(), height) | ||
|
|
||
| self.window.setCentralWidget(self.canvas) | ||
| Expand Down Expand Up | @@ -599,7 +597,7 @@ def _get_toolbar(self, canvas, parent): | |
| # must be inited after the window, drawingArea and figure | ||
| # attrs are set | ||
| if matplotlib.rcParams['toolbar'] == 'toolbar2': | ||
| toolbar = NavigationToolbar2QT(canvas, parent, False) | ||
| toolbar = NavigationToolbar2QT(canvas, parent, True) | ||
| elif matplotlib.rcParams['toolbar'] == 'toolmanager': | ||
| toolbar = ToolbarQt(self.toolmanager, self.window) | ||
| else: | ||
| Expand Down Expand Up | @@ -679,7 +677,7 @@ def __init__(self, canvas, parent, coordinates=True): | |
| if self.coordinates: | ||
| self.locLabel = QtWidgets.QLabel("", self) | ||
| self.locLabel.setAlignment( | ||
| QtCore.Qt.AlignRight | QtCore.Qt.AlignTop) | ||
| QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) | ||
| self.locLabel.setSizePolicy( | ||
| QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, | ||
| QtWidgets.QSizePolicy.Ignored)) | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.