8000 Fix bug when resizing qt4 figure window. by tonysyu · Pull Request #756 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Fix bug when resizing qt4 figure window. #756

New issue

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

Merged
merged 1 commit into from
Jun 1, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions lib/matplotlib/backends/backend_qt4.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,9 @@ def __init__( self, canvas, num ):
# requested size:
cs = canvas.sizeHint()
sbs = self.window.statusBar().sizeHint()
self.window.resize(cs.width(), cs.height()+tbs_height+sbs.height())
self._status_and_tool_height = tbs_height+sbs.height()
height = cs.height() + self._status_and_tool_height
self.window.resize(cs.width(), height)

self.window.setCentralWidget(self.canvas)

Expand Down Expand Up @@ -364,7 +366,7 @@ def _get_toolbar(self, canvas, parent):

def resize(self, width, height):
'set the canvas size in pixels'
self.window.resize(width, height)
self.window.resize(width, height + self._status_and_tool_height)

def show(self):
self.window.show()
Expand Down
0