fix runtime bitmap scaling error on mac

This commit is contained in:
Grange Nagy
2023-12-02 18:09:02 -05:00
parent 0dd7dea708
commit b889da7e68

View File

@@ -103,10 +103,9 @@ class BitmapLoader:
pyfalog.warning("Missing icon file: {0}/{1}".format(location, filename))
return None
bmp: wx.Bitmap = img.ConvertToBitmap()
if scale > 1:
bmp.SetSize((bmp.GetWidth() // scale, bmp.GetHeight() // scale))
return bmp
return img.Scale(img.GetWidth() // scale, img.GetHeight() // scale).ConvertToBitmap()
return img.ConvertToBitmap()
@classmethod
def loadScaledBitmap(cls, name, location, scale=0):