Cast coordinates passed to various wx objects into ints

See #2391 for more info
This commit is contained in:
DarkPhoenix
2022-04-20 02:12:46 +04:00
parent e98ae5de39
commit a98e898bd8
11 changed files with 53 additions and 53 deletions

View File

@@ -43,14 +43,14 @@ def DrawGradientBar(width, height, gStart, gEnd, gMid=None, fillRatio=4):
mdc.SelectObject(canvas)
r = wx.Rect(0, 0, width, height)
r.SetHeight(height / fillRatio)
r.SetHeight(round(height / fillRatio))
if gMid is None:
gMid = gStart
mdc.GradientFillLinear(r, gStart, gMid, wx.SOUTH)
r.SetTop(r.GetHeight())
r.SetHeight(height * (fillRatio - 1) / fillRatio + (1 if height % fillRatio != 0 else 0))
r.SetHeight(round(height * (fillRatio - 1) / fillRatio + (1 if height % fillRatio != 0 else 0)))
mdc.GradientFillLinear(r, gMid, gEnd, wx.SOUTH)