mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1506 (Fix potential crash in ebook-edit due to type mismatch.)
This commit is contained in:
parent
4b7a9ee39e
commit
e8e571c03c
@ -97,7 +97,7 @@ class ImageDelegate(QStyledItemDelegate):
|
|||||||
f = self.parent().font()
|
f = self.parent().font()
|
||||||
sz = f.pixelSize()
|
sz = f.pixelSize()
|
||||||
if sz < 5:
|
if sz < 5:
|
||||||
sz = f.pointSize() * self.parent().logicalDpiY() / 72.0
|
sz = int(f.pointSize() * self.parent().logicalDpiY() / 72.0)
|
||||||
self.title_height = max(25, sz + 10)
|
self.title_height = max(25, sz + 10)
|
||||||
self.item_size = self.cover_size + QSize(2 * self.MARGIN, (2 * self.MARGIN) + self.title_height)
|
self.item_size = self.cover_size + QSize(2 * self.MARGIN, (2 * self.MARGIN) + self.title_height)
|
||||||
self.calculate_spacing()
|
self.calculate_spacing()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user