py310: more float->int goodness

This commit is contained in:
Kovid Goyal 2022-02-03 07:56:45 +05:30
parent 9d0b555d80
commit 0ffbd4e3a8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -455,7 +455,7 @@ class CoverDelegate(QStyledItemDelegate):
if spc < 0.01: if spc < 0.01:
self.spacing = max(10, min(50, int(0.1 * self.original_width))) self.spacing = max(10, min(50, int(0.1 * self.original_width)))
else: else:
self.spacing = self.parent().logicalDpiX() * CM_TO_INCH * spc self.spacing = int(self.parent().logicalDpiX() * CM_TO_INCH * spc)
def sizeHint(self, option, index): def sizeHint(self, option, index):
return self.item_size return self.item_size