fix: Correct types of arguments to ScrolledWindow.SetScrollbars

(cherry picked from commit 3eb9eb32dc)
This commit is contained in:
Glen Whitney
2021-08-31 11:06:27 -07:00
committed by Scott Talbert
parent 400b7761fd
commit 7c43dd1ab6
3 changed files with 9 additions and 9 deletions

View File

@@ -56,7 +56,7 @@ class TestMaskWindow(wx.ScrolledWindow):
mask = wx.Mask(self.bmp_withcolourmask, wx.WHITE)
self.bmp_withcolourmask.SetMask(mask)
self.SetScrollbars(20, 20, 700/20, 460/20)
self.SetScrollbars(20, 20, 700//20, 460//20)
self.Bind(wx.EVT_PAINT, self.OnPaint)

View File

@@ -272,7 +272,7 @@ class TestWindow(ogl.ShapeCanvas):
maxWidth = 1000
maxHeight = 1000
self.SetScrollbars(20, 20, maxWidth/20, maxHeight/20)
self.SetScrollbars(20, 20, maxWidth//20, maxHeight//20)
self.log = log
self.frame = frame

View File

@@ -9630,8 +9630,8 @@ class UltimateListMainWindow(wx.ScrolledWindow):
self._linesPerPage = clientHeight//lineHeight
self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
(self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
(entireHeight + lineHeight - 1)/lineHeight,
(self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
(entireHeight + lineHeight - 1)//lineHeight,
self.GetScrollPos(wx.HORIZONTAL),
self.GetScrollPos(wx.VERTICAL),
True)
@@ -9652,8 +9652,8 @@ class UltimateListMainWindow(wx.ScrolledWindow):
decrement = SCROLL_UNIT_X
self.SetScrollbars(SCROLL_UNIT_X, SCROLL_UNIT_Y,
(self.GetHeaderWidth()-decrement)/SCROLL_UNIT_X,
(entireHeight + SCROLL_UNIT_Y - 1)/SCROLL_UNIT_Y,
(self.GetHeaderWidth()-decrement)//SCROLL_UNIT_X,
(entireHeight + SCROLL_UNIT_Y - 1)//SCROLL_UNIT_Y,
self.GetScrollPos(wx.HORIZONTAL),
self.GetScrollPos(wx.VERTICAL),
True)
@@ -9704,8 +9704,8 @@ class UltimateListMainWindow(wx.ScrolledWindow):
line._gi.ExtendWidth(widthMax)
self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
(x + SCROLL_UNIT_X)/SCROLL_UNIT_X,
(y + lineHeight)/lineHeight,
(x + SCROLL_UNIT_X)//SCROLL_UNIT_X,
(y + lineHeight)//lineHeight,
self.GetScrollPos(wx.HORIZONTAL),
self.GetScrollPos(wx.VERTICAL),
True)
@@ -9773,7 +9773,7 @@ class UltimateListMainWindow(wx.ScrolledWindow):
break # Everything fits, no second try required.
self.SetScrollbars(SCROLL_UNIT_X, lineHeight,
(entireWidth + SCROLL_UNIT_X)/SCROLL_UNIT_X,
(entireWidth + SCROLL_UNIT_X)//SCROLL_UNIT_X,
0,
self.GetScrollPos(wx.HORIZONTAL),
0,