mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
ac500c4c8c
commit
43bf3cc68d
@ -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:
|
||||
|
@ -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): # {{{
|
||||
|
Loading…
x
Reference in New Issue
Block a user