You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
86 lines
4.0 KiB
86 lines
4.0 KiB
From https://github.com/wxWidgets/Phoenix/commit/3eb9eb32dc3285435039f6c420c398665372a1ad
|
|
From 3eb9eb32dc3285435039f6c420c398665372a1ad Mon Sep 17 00:00:00 2001
|
|
From: Glen Whitney <glen@studioinfinity.org>
|
|
Date: Tue, 31 Aug 2021 11:06:27 -0700
|
|
Subject: [PATCH] fix: Correct types of arguments to
|
|
ScrolledWindow.SetScrollbars
|
|
|
|
---
|
|
demo/Mask.py | 2 +-
|
|
demo/OGL.py | 2 +-
|
|
wx/lib/agw/ultimatelistctrl.py | 14 +++++++-------
|
|
3 files changed, 9 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/demo/Mask.py b/demo/Mask.py
|
|
index 5f0c2cdde..109b8f30b 100644
|
|
--- a/demo/Mask.py
|
|
+++ b/demo/Mask.py
|
|
@@ -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)
|
|
|
|
diff --git a/demo/OGL.py b/demo/OGL.py
|
|
index 72ca543dd..d475e5011 100644
|
|
--- a/demo/OGL.py
|
|
+++ b/demo/OGL.py
|
|
@@ -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
|
|
diff --git a/wx/lib/agw/ultimatelistctrl.py b/wx/lib/agw/ultimatelistctrl.py
|
|
index c60867684..14fc41f86 100644
|
|
--- a/wx/lib/agw/ultimatelistctrl.py
|
|
+++ b/wx/lib/agw/ultimatelistctrl.py
|
|
@@ -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)
|
|
@@ -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)
|
|
@@ -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)
|
|
@@ -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,
|