mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Edit metadata dialog: Have the cover view be a constant default size
This commit is contained in:
parent
a7dd8eb33c
commit
549b89c82f
@ -24,7 +24,7 @@ from calibre.ebooks.metadata.meta import get_metadata
|
|||||||
from calibre.gui2 import file_icon_provider, UNDEFINED_QDATE, UNDEFINED_DATE, \
|
from calibre.gui2 import file_icon_provider, UNDEFINED_QDATE, UNDEFINED_DATE, \
|
||||||
choose_files, error_dialog, choose_images, question_dialog
|
choose_files, error_dialog, choose_images, question_dialog
|
||||||
from calibre.utils.date import local_tz, qt_to_dt
|
from calibre.utils.date import local_tz, qt_to_dt
|
||||||
from calibre import strftime, fit_image
|
from calibre import strftime
|
||||||
from calibre.ebooks import BOOK_EXTENSIONS
|
from calibre.ebooks import BOOK_EXTENSIONS
|
||||||
from calibre.customize.ui import run_plugins_on_import
|
from calibre.customize.ui import run_plugins_on_import
|
||||||
from calibre.utils.date import utcfromtimestamp
|
from calibre.utils.date import utcfromtimestamp
|
||||||
@ -672,12 +672,7 @@ class Cover(ImageView): # {{{
|
|||||||
self.frame_size = (sz.width()//3, sz.height())
|
self.frame_size = (sz.width()//3, sz.height())
|
||||||
|
|
||||||
def sizeHint(self):
|
def sizeHint(self):
|
||||||
sz = ImageView.sizeHint(self)
|
sz = QSize(self.frame_size[0], self.frame_size[1])
|
||||||
w, h = sz.width(), sz.height()
|
|
||||||
resized, nw, nh = fit_image(w, h, self.frame_size[0],
|
|
||||||
self.frame_size[1])
|
|
||||||
if resized:
|
|
||||||
sz = QSize(nw, nh)
|
|
||||||
return sz
|
return sz
|
||||||
|
|
||||||
def select_cover(self, *args):
|
def select_cover(self, *args):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user