aboutsummaryrefslogtreecommitdiff
path: root/src/gui/preview_win.py
diff options
context:
space:
mode:
authortassaron2022-04-13 16:04:32 -0400
committertassaron2022-04-13 16:04:32 -0400
commit765a35119f258f352718a556fbea4af708236900 (patch)
treecacd95152875f47f6fcb2d1114e5ea8499b05bcf /src/gui/preview_win.py
parenteadf0e59fda3b442bf660b562c5fc4a70ba18c33 (diff)
cast floats to ints when calling resize(), setX(), and setY() (argument types changed in newer version)
Diffstat (limited to 'src/gui/preview_win.py')
-rw-r--r--src/gui/preview_win.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/preview_win.py b/src/gui/preview_win.py
index 3db420c..27e0a59 100644
--- a/src/gui/preview_win.py
+++ b/src/gui/preview_win.py
@@ -25,8 +25,8 @@ class PreviewWindow(QtWidgets.QLabel):
transformMode=QtCore.Qt.SmoothTransformation)
# start painting the label from left upper corner
- point.setX((size.width() - scaledPix.width())/2)
- point.setY((size.height() - scaledPix.height())/2)
+ point.setX(int((size.width() - scaledPix.width())/2))
+ point.setY(int((size.height() - scaledPix.height())/2))
painter.drawPixmap(point, scaledPix)
def changePixmap(self, img):