From d6ef3afb06f1b5840795d15356c4d4475a87ea98 Mon Sep 17 00:00:00 2001 From: DolphyWind Date: Fri, 30 Sep 2022 09:06:21 +0300 Subject: [PATCH] Another resizing fix Set max_wh to 128 Change the ratio to width/height --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index a6b73ee..7678b72 100644 --- a/main.py +++ b/main.py @@ -492,8 +492,8 @@ def createSurfWordsMenu(self, currentWord:word.Word = None): if currentWord.imageExists: self.surfWords_ImageLabel = QtWidgets.QLabel() pixmap = QtGui.QPixmap(currentWord.imagePath) - ratio = pixmap.height() / pixmap.width() - max_wh = 100 + ratio = pixmap.width() / pixmap.height() + max_wh = 128 new_width, new_height = 0, 0 if ratio > 1: