From eb9861b5a1a16f6c09637a0478711d4f1dee8621 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 2 Jun 2012 23:28:53 +0530 Subject: [PATCH] ... --- src/calibre/gui2/__init__.py | 9 ++++++--- src/calibre/gui2/metadata/single.py | 1 - 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/calibre/gui2/__init__.py b/src/calibre/gui2/__init__.py index 8ad0291d19..55c59b3677 100644 --- a/src/calibre/gui2/__init__.py +++ b/src/calibre/gui2/__init__.py @@ -731,6 +731,9 @@ class Application(QApplication): qt_app = self self._file_open_paths = [] self._file_open_lock = RLock() + self.setup_styles() + + def setup_styles(self): self.original_font = QFont(QApplication.font()) fi = gprefs['font'] if fi is not None: @@ -739,9 +742,7 @@ class Application(QApplication): if s is not None: font.setStretch(s) QApplication.setFont(font) - self.setup_styles() - def setup_styles(self): if gprefs['widget_style'] != 'system': # On OS X QtCurve resets the palette, so we preserve it explicitly orig_pal = QPalette(self.palette()) @@ -766,7 +767,9 @@ class Application(QApplication): # pushbuttons with icons from PyQt4.Qt import QPushButton w = QPushButton() - self.setStyleSheet('QPushButton { min-height: %dpx }'%w.iconSize().height()) + self.setStyleSheet('QPushButton { min-height: %dpx }'% + (w.iconSize().height())) + def _send_file_open_events(self): with self._file_open_lock: diff --git a/src/calibre/gui2/metadata/single.py b/src/calibre/gui2/metadata/single.py index 9256739d22..eb00e8365a 100644 --- a/src/calibre/gui2/metadata/single.py +++ b/src/calibre/gui2/metadata/single.py @@ -87,7 +87,6 @@ class MetadataSingleDialogBase(ResizableDialog): self.l.addLayout(ll) ll.addSpacing(10) ll.addWidget(self.button_box) - ll.addSpacing(10) self.setWindowIcon(QIcon(I('edit_input.png'))) self.setWindowTitle(BASE_TITLE)