make sure pixmap height is an int
This commit is contained in:
@@ -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,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user