make sure pixmap height is an int

This commit is contained in:
dries.k
2022-12-03 10:06:00 +01:00
parent f7c162ecc9
commit 304daee5ff

View File

@@ -112,7 +112,7 @@ class MessageWidget(QtWidgets.QWidget, Ui_Form):
if pixmap.width() > W: if pixmap.width() > W:
pixmap = pixmap.scaled( pixmap = pixmap.scaled(
W, W,
0.5 * self.parent.height(), int(0.5 * self.parent.height()),
aspectRatioMode=QtCore.Qt.AspectRatioMode.KeepAspectRatio, aspectRatioMode=QtCore.Qt.AspectRatioMode.KeepAspectRatio,
transformMode=QtCore.Qt.TransformationMode.SmoothTransformation, transformMode=QtCore.Qt.TransformationMode.SmoothTransformation,
) )