Fix #1506 (Fix potential crash in ebook-edit due to type mismatch.)

This commit is contained in:
Kovid Goyal 2021-10-17 06:14:41 +05:30
parent 4b7a9ee39e
commit e8e571c03c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -97,7 +97,7 @@ class ImageDelegate(QStyledItemDelegate):
f = self.parent().font()
sz = f.pixelSize()
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.item_size = self.cover_size + QSize(2 * self.MARGIN, (2 * self.MARGIN) + self.title_height)
self.calculate_spacing()