mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix download metadata button in edit metadata dialog being narrower than the other buttons
This commit is contained in:
parent
2d48de8cb2
commit
80dba5bf55
@ -241,6 +241,14 @@ class MetadataSingleDialogBase(ResizableDialog):
|
||||
self.basic_metadata_widgets.extend([self.timestamp, self.pubdate])
|
||||
|
||||
self.fetch_metadata_button = b = RightClickButton(self)
|
||||
# The following rigmarole is needed so that Qt gives the button the
|
||||
# same height as the other buttons in the dialog. There is no way to
|
||||
# center the text in a QToolButton with an icon, so we cant just set an
|
||||
# icon
|
||||
b.setIcon(QIcon(I('download-metadata.png')))
|
||||
b.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
|
||||
b.setMinimumHeight(b.sizeHint().height())
|
||||
b.setIcon(QIcon())
|
||||
b.setText(_('&Download metadata')), b.setPopupMode(b.DelayedPopup)
|
||||
b.setToolTip(_('Download metadata for this book [%s]') % self.download_shortcut.key().toString(QKeySequence.NativeText))
|
||||
b.setSizePolicy(QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed))
|
||||
|
Loading…
x
Reference in New Issue
Block a user