Ensure ints are passed to Scale()
This commit is contained in:
@@ -104,7 +104,7 @@ class BitmapLoader:
|
||||
return None
|
||||
|
||||
if scale > 1:
|
||||
return img.Scale(img.GetWidth() // scale, img.GetHeight() // scale).ConvertToBitmap()
|
||||
return img.Scale(round(img.GetWidth() // scale), round(img.GetHeight() // scale)).ConvertToBitmap()
|
||||
return img.ConvertToBitmap()
|
||||
|
||||
@classmethod
|
||||
|
||||
@@ -68,7 +68,7 @@ class RaceSelector(wx.Window):
|
||||
img = img.Rotate90(False)
|
||||
img.Replace(0, 0, 0, sysTextColour[0], sysTextColour[1], sysTextColour[2])
|
||||
if layout == wx.VERTICAL:
|
||||
img = img.Scale(self.minWidth, 8, wx.IMAGE_QUALITY_HIGH)
|
||||
img = img.Scale(round(self.minWidth), 8, wx.IMAGE_QUALITY_HIGH)
|
||||
|
||||
self.bmpArrow = wx.Bitmap(img)
|
||||
|
||||
|
||||
@@ -525,7 +525,7 @@ class _TabRenderer:
|
||||
|
||||
# convert middle bitmap and scale to tab width
|
||||
cm = self.ctab_middle_bmp.ConvertToImage()
|
||||
mimg = cm.Scale(self.content_width, self.ctab_middle.GetHeight(),
|
||||
mimg = cm.Scale(round(self.content_width), round(self.ctab_middle.GetHeight()),
|
||||
wx.IMAGE_QUALITY_NORMAL)
|
||||
mbmp = wx.Bitmap(mimg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user