From 37798ef22578a8e2cfa5f9709f3ddb7d8bc2883f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 17 Apr 2011 09:02:07 -0600 Subject: [PATCH] ... --- src/calibre/gui2/layout.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/layout.py b/src/calibre/gui2/layout.py index e5ec5a9131..93bb8ce331 100644 --- a/src/calibre/gui2/layout.py +++ b/src/calibre/gui2/layout.py @@ -317,6 +317,8 @@ class BaseToolBar(QToolBar): # {{{ QToolBar.resizeEvent(self, ev) style = self.get_text_style() self.setToolButtonStyle(style) + if hasattr(self, 'd_widget'): + self.d_widget.filler.setVisible(style != Qt.ToolButtonIconOnly) def get_text_style(self): style = Qt.ToolButtonTextUnderIcon @@ -399,7 +401,8 @@ class ToolBar(BaseToolBar): # {{{ self.d_widget.layout().addWidget(self.donate_button) if isosx: self.d_widget.setStyleSheet('QWidget, QToolButton {background-color: none; border: none; }') - self.d_widget.layout().addWidget(QLabel(u'\u00a0')) + self.d_widget.filler = QLabel(u'\u00a0') + self.d_widget.layout().addWidget(self.d_widget.filler) bar.addWidget(self.d_widget) self.showing_donate = True elif what in self.gui.iactions: