minsize --> getminsize

This commit is contained in:
Guido van Rossum 1991-08-16 13:05:37 +00:00
parent 1e5ad4e9bb
commit ca197b520e
2 changed files with 4 additions and 6 deletions

View file

@ -9,14 +9,13 @@ from Split import Split
class CSplit() = Split(): class CSplit() = Split():
# #
def minsize(self, m): def getminsize(self, (m, (width, height))):
# Since things look best if the children are spaced evenly # Since things look best if the children are spaced evenly
# along the circle (and often all children have the same # along the circle (and often all children have the same
# size anyway) we compute the max child size and assume # size anyway) we compute the max child size and assume
# this is each child's size. # this is each child's size.
width, height = 0, 0
for child in self.children: for child in self.children:
wi, he = child.minsize(m) wi, he = child.getminsize(m, (0, 0))
width = max(width, wi) width = max(width, wi)
height = max(height, he) height = max(height, he)
# In approximation, the diameter of the circle we need is # In approximation, the diameter of the circle we need is

View file

@ -9,14 +9,13 @@ from Split import Split
class CSplit() = Split(): class CSplit() = Split():
# #
def minsize(self, m): def getminsize(self, (m, (width, height))):
# Since things look best if the children are spaced evenly # Since things look best if the children are spaced evenly
# along the circle (and often all children have the same # along the circle (and often all children have the same
# size anyway) we compute the max child size and assume # size anyway) we compute the max child size and assume
# this is each child's size. # this is each child's size.
width, height = 0, 0
for child in self.children: for child in self.children:
wi, he = child.minsize(m) wi, he = child.getminsize(m, (0, 0))
width = max(width, wi) width = max(width, wi)
height = max(height, he) height = max(height, he)
# In approximation, the diameter of the circle we need is # In approximation, the diameter of the circle we need is