From f6f6d5236eb5b7780975843fdbe2b0ffa470959c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 2 Jun 2012 00:54:08 +0530 Subject: [PATCH] Ensure that push buttons with no icons are not narrower than push buttons with icons --- src/calibre/gui2/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index f0f069639a..8ad0291d19 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -762,6 +762,11 @@ class Application(QApplication): self.setStyle('Plastique') elif 'Cleanlooks' in styles: self.setStyle('Cleanlooks') + # Ensure that pushbuttons with no icons are not narrower than + # pushbuttons with icons + from PyQt4.Qt import QPushButton + w = QPushButton() + self.setStyleSheet('QPushButton { min-height: %dpx }'%w.iconSize().height()) def _send_file_open_events(self): with self._file_open_lock: