@@ -550,23 +550,21 @@ def __init__(self, canvas, num):
550550 if self .toolbar :
551551 backend_tools .add_tools_to_container (self .toolbar )
552552 self .statusbar = StatusbarQt (self .window , self .toolmanager )
553+ sbs_height = self .statusbar .sizeHint ().height ()
554+ else :
555+ sbs_height = 0
553556
554557 if self .toolbar is not None :
555558 self .window .addToolBar (self .toolbar )
556- if not self .toolmanager :
557- # add text label to status bar
558- statusbar_label = QtWidgets .QLabel ()
559- self .window .statusBar ().addWidget (statusbar_label )
560- self .toolbar .message .connect (statusbar_label .setText )
561559 tbs_height = self .toolbar .sizeHint ().height ()
562560 else :
563561 tbs_height = 0
564562
565563 # resize the main window so it will display the canvas with the
566564 # requested size:
567565 cs = canvas .sizeHint ()
568- sbs = self . window . statusBar (). sizeHint ()
569- height = cs . height () + tbs_height + sbs . height ()
566+ cs_height = cs . height ()
567+ height = cs_height + tbs_height + sbs_height
570568 self .window .resize (cs .width (), height )
571569
572570 self .window .setCentralWidget (self .canvas )
@@ -599,7 +597,7 @@ def _get_toolbar(self, canvas, parent):
599597 # must be inited after the window, drawingArea and figure
600598 # attrs are set
601599 if matplotlib .rcParams ['toolbar' ] == 'toolbar2' :
602- toolbar = NavigationToolbar2QT (canvas , parent , False )
600+ toolbar = NavigationToolbar2QT (canvas , parent , True )
603601 elif matplotlib .rcParams ['toolbar' ] == 'toolmanager' :
604602 toolbar = ToolbarQt (self .toolmanager , self .window )
605603 else :
@@ -679,7 +677,7 @@ def __init__(self, canvas, parent, coordinates=True):
679677 if self .coordinates :
680678 self .locLabel = QtWidgets .QLabel ("" , self )
681679 self .locLabel .setAlignment (
682- QtCore .Qt .AlignRight | QtCore .Qt .AlignTop )
680+ QtCore .Qt .AlignRight | QtCore .Qt .AlignVCenter )
683681 self .locLabel .setSizePolicy (
684682 QtWidgets .QSizePolicy (QtWidgets .QSizePolicy .Expanding ,
685683 QtWidgets .QSizePolicy .Ignored ))
0 commit comments