This commit is contained in:
Kovid Goyal 2012-06-03 01:15:17 +05:30
parent ac500c4c8c
commit 43bf3cc68d
2 changed files with 11 additions and 8 deletions

View File

@ -763,13 +763,6 @@ 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:

View File

@ -96,11 +96,21 @@ class MetadataSingleDialogBase(ResizableDialog):
if len(self.db.custom_column_label_map):
self.create_custom_metadata_widgets()
self.do_layout()
geom = gprefs.get('metasingle_window_geometry3', None)
if geom is not None:
self.restoreGeometry(bytes(geom))
self.title.resizeEvent = self.fix_push_buttons
def fix_push_buttons(self, *args):
# Ensure all PushButtons stay the same consistent height throughout this
# dialog. Without this, the buttons inside scrollareas get shrunk,
# while the buttons outside them do not, leading to weirdness.
ht = self.title.height()
for but in self.findChildren(QPushButton):
but.setMaximumHeight(ht)
but.setMinimumHeight(ht)
return TitleEdit.resizeEvent(self.title, *args)
# }}}
def create_basic_metadata_widgets(self): # {{{