summaryrefslogtreecommitdiffstats
path: root/Lib/stdwin/Sliders.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-08-16 13:17:07 (GMT)
committerGuido van Rossum <guido@python.org>1991-08-16 13:17:07 (GMT)
commitce27298640bb05e8398e2c00e56627926caa0c05 (patch)
tree600c74033d23a9d6ec0fe7c9d23c0a20e1733c3f /Lib/stdwin/Sliders.py
parentcadae0fc1499c99d9dba21430fab5c67c8725d91 (diff)
downloadcpython-ce27298640bb05e8398e2c00e56627926caa0c05.zip
cpython-ce27298640bb05e8398e2c00e56627926caa0c05.tar.gz
cpython-ce27298640bb05e8398e2c00e56627926caa0c05.tar.bz2
minsize --> getminsize; new implementation of getminsize
Diffstat (limited to 'Lib/stdwin/Sliders.py')
-rwxr-xr-xLib/stdwin/Sliders.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/Lib/stdwin/Sliders.py b/Lib/stdwin/Sliders.py
index f655e77..a07c3c4 100755
--- a/Lib/stdwin/Sliders.py
+++ b/Lib/stdwin/Sliders.py
@@ -145,14 +145,13 @@ class ComplexSlider() = HSplit():
#
# Override HSplit methods
#
- def minsize(self, m):
- w1, h1 = self.downbutton.minsize(m)
- w2, h2 = self.dragbutton.minsize(m)
- w3, h3 = self.upbutton.minsize(m)
- height = max(h1, h2, h3)
- w1 = max(w1, height)
- w3 = max(w3, height)
- return w1+w2+w3, height
+ def getminsize(self, (m, (width, height))):
+ w1, h1 = self.downbutton.getminsize(m, (0, height))
+ w3, h3 = self.upbutton.getminsize(m, (0, height))
+ w1 = max(w1, h1)
+ w3 = max(w3, h3)
+ w2, h2 = self.dragbutton.getminsize(m, (width-w1-w3, height))
+ return w1+w2+w3, max(h1, h2, h3)
#
def setbounds(self, bounds):
(left, top), (right, bottom) = self.bounds = bounds