Skip to content

Commit

Permalink
fix: Correct types of arguments to ScrolledWindow.SetScrollbars
Browse files Browse the repository at this point in the history
  • Loading branch information
gwhitney committed Aug 31, 2021
1 parent 64e5d86 commit 3eb9eb3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion demo/Mask.py
Expand Up @@ -56,7 +56,7 @@ def __init__(self, parent):
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)

Expand Down
2 changes: 1 addition & 1 deletion demo/OGL.py
Expand Up @@ -272,7 +272,7 @@ def __init__(self, parent, log, frame):

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
Expand Down
14 changes: 7 additions & 7 deletions wx/lib/agw/ultimatelistctrl.py
Expand Up @@ -9654,8 +9654,8 @@ def RecalculatePositions(self, noRefresh=False):
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)
Expand All @@ -9676,8 +9676,8 @@ def RecalculatePositions(self, noRefresh=False):
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)
Expand Down Expand Up @@ -9728,8 +9728,8 @@ def RecalculatePositions(self, noRefresh=False):
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)
Expand Down Expand Up @@ -9797,7 +9797,7 @@ def RecalculatePositions(self, noRefresh=False):
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,
Expand Down

0 comments on commit 3eb9eb3

Please sign in to comment.