Ensure that push buttons with no icons are not narrower than push buttons with icons

This commit is contained in:
Kovid Goyal 2012-06-02 00:54:08 +05:30
parent ececf6f9bb
commit f6f6d5236e

View File

@ -762,6 +762,11 @@ class Application(QApplication):
self.setStyle('Plastique') self.setStyle('Plastique')
elif 'Cleanlooks' in styles: elif 'Cleanlooks' in styles:
self.setStyle('Cleanlooks') 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): def _send_file_open_events(self):
with self._file_open_lock: with self._file_open_lock: