Skip to content

Commit

Permalink
Resizing Fix
Browse files Browse the repository at this point in the history
Resized images are not pixelated anymore
  • Loading branch information
DolphyWind committed Sep 29, 2022
1 parent 5f65508 commit d86c137
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,8 @@ def createSurfWordsMenu(self, currentWord:word.Word = None):
new_width = int(max_wh * ratio)
new_height = max_wh

pixmap = pixmap.scaledToWidth(new_width)
pixmap = pixmap.scaledToHeight(new_height)
pixmap = pixmap.scaledToWidth(new_width, QtCore.Qt.SmoothTransformation)
pixmap = pixmap.scaledToHeight(new_height, QtCore.Qt.SmoothTransformation)

self.surfWords_ImageLabel.setPixmap(pixmap)

Expand Down Expand Up @@ -592,7 +592,7 @@ def getRandomWord():
new_word = word.Word()
keys_list = list(self.wordData.keys())
if len(keys_list) <= 1:
return
return
randomWord = random.choice(keys_list)
while randomWord == currentWord.word:
randomWord = random.choice(keys_list)
Expand Down

0 comments on commit d86c137

Please sign in to comment.