Addon Manager: Do not change image size

The new UI has much more space available to display README files: remove
the code that scaled the images to (sometimes unreadable) 300x300 size.
This commit is contained in:
Chris Hennes
2021-12-29 23:51:21 -06:00
parent dc1c227ad4
commit a6b306123a

View File

@@ -874,19 +874,6 @@ class ShowWorker(QtCore.QThread):
f = open(storename, "wb")
f.write(imagedata)
f.close()
# resize the image to 300x300px if needed
img = QtGui.QImage(storename)
if (img.width() > 300) or (img.height() > 300):
pix = QtGui.QPixmap()
pix = pix.fromImage(
img.scaled(
300,
300,
QtCore.Qt.KeepAspectRatio,
QtCore.Qt.FastTransformation,
)
)
pix.save(storename, "jpeg", 100)
message = message.replace(
'src="' + origpath,
'src="file:///' + storename.replace("\\", "/"),