fix: Correct types of arguments to ScrolledWindow.SetScrollbars

This commit is contained in:
Glen Whitney
2021-08-31 11:06:27 -07:00
parent 64e5d863f7
commit 3eb9eb32dc
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

@@ -9654,8 +9654,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)
@@ -9676,8 +9676,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)
@@ -9728,8 +9728,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)
@@ -9797,7 +9797,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,