mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
fdfac7f3df
commit
eb9861b5a1
@ -731,6 +731,9 @@ class Application(QApplication):
|
|||||||
qt_app = self
|
qt_app = self
|
||||||
self._file_open_paths = []
|
self._file_open_paths = []
|
||||||
self._file_open_lock = RLock()
|
self._file_open_lock = RLock()
|
||||||
|
self.setup_styles()
|
||||||
|
|
||||||
|
def setup_styles(self):
|
||||||
self.original_font = QFont(QApplication.font())
|
self.original_font = QFont(QApplication.font())
|
||||||
fi = gprefs['font']
|
fi = gprefs['font']
|
||||||
if fi is not None:
|
if fi is not None:
|
||||||
@ -739,9 +742,7 @@ class Application(QApplication):
|
|||||||
if s is not None:
|
if s is not None:
|
||||||
font.setStretch(s)
|
font.setStretch(s)
|
||||||
QApplication.setFont(font)
|
QApplication.setFont(font)
|
||||||
self.setup_styles()
|
|
||||||
|
|
||||||
def setup_styles(self):
|
|
||||||
if gprefs['widget_style'] != 'system':
|
if gprefs['widget_style'] != 'system':
|
||||||
# On OS X QtCurve resets the palette, so we preserve it explicitly
|
# On OS X QtCurve resets the palette, so we preserve it explicitly
|
||||||
orig_pal = QPalette(self.palette())
|
orig_pal = QPalette(self.palette())
|
||||||
@ -766,7 +767,9 @@ class Application(QApplication):
|
|||||||
# pushbuttons with icons
|
# pushbuttons with icons
|
||||||
from PyQt4.Qt import QPushButton
|
from PyQt4.Qt import QPushButton
|
||||||
w = 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):
|
def _send_file_open_events(self):
|
||||||
with self._file_open_lock:
|
with self._file_open_lock:
|
||||||
|
@ -87,7 +87,6 @@ class MetadataSingleDialogBase(ResizableDialog):
|
|||||||
self.l.addLayout(ll)
|
self.l.addLayout(ll)
|
||||||
ll.addSpacing(10)
|
ll.addSpacing(10)
|
||||||
ll.addWidget(self.button_box)
|
ll.addWidget(self.button_box)
|
||||||
ll.addSpacing(10)
|
|
||||||
|
|
||||||
self.setWindowIcon(QIcon(I('edit_input.png')))
|
self.setWindowIcon(QIcon(I('edit_input.png')))
|
||||||
self.setWindowTitle(BASE_TITLE)
|
self.setWindowTitle(BASE_TITLE)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user