Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tawindow.py
diff options
context:
space:
mode:
authorWalter Bender <walter@walter-laptop.(none)>2010-02-11 17:56:44 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2010-02-11 17:56:44 (GMT)
commitba247ce8f380ed45009dee1417f4e2be78aa3b54 (patch)
tree7117dccd9f864216c8cc66d81f7dc4013c59cff7 /tawindow.py
parenta09068704b3177e48b1195f0f01f0ace412a02ea (diff)
cleaning up loose ends
Diffstat (limited to 'tawindow.py')
-rw-r--r--tawindow.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/tawindow.py b/tawindow.py
index 1fc00c7..04bb5a7 100644
--- a/tawindow.py
+++ b/tawindow.py
@@ -512,22 +512,22 @@ class TurtleArtWindow():
Position prototypes in a horizontal palette.
"""
def _horizontal_layout(self, x, y, blocks):
- _max = 0
+ _max_w = 0
for b in blocks:
_w, _h = self._width_and_height(b)
if y+_h > PALETTE_HEIGHT+ICON_SIZE:
- x += int(_max+5)
+ x += int(_max_w+5)
y = ICON_SIZE+5
- _max = 0
+ _max_w = 0
(_bx, _by) = b.spr.get_xy()
_dx = x-_bx
_dy = y-_by
for g in self._find_group(b):
g.spr.move_relative((int(_dx), int(_dy)))
y += int(_h+5)
- if _w > _max:
- _max = _w
- return x, y, _max
+ if _w > _max_w:
+ _max_w = _w
+ return x, y, _max_w
"""
Position prototypes in a vertical palette.
@@ -535,7 +535,7 @@ class TurtleArtWindow():
def _vertical_layout(self, x, y, blocks):
_row = []
_row_w = 0
- _max = 0
+ _max_h = 0
for _b in blocks:
_w, _h = self._width_and_height(_b)
if x+_w > PALETTE_WIDTH:
@@ -543,12 +543,12 @@ class TurtleArtWindow():
_dx = int((PALETTE_WIDTH-_row_w)/2)
for _r in _row:
for _g in self._find_group(_r):
- _g.spr.move_relative((_dx, 0))
+ _g.spr.move_relative((_dx, 0))
_row = []
_row_w = 0
x = 5
- y += int(_max+5)
- _max = 0
+ y += int(_max_h+5)
+ _max_h = 0
_row.append(_b)
_row_w += (5+_w)
(_bx, _by) = _b.spr.get_xy()
@@ -557,14 +557,14 @@ class TurtleArtWindow():
for _g in self._find_group(_b):
_g.spr.move_relative((_dx, _dy))
x += int(_w+5)
- if _h > _max:
- _max = _h
+ if _h > _max_h:
+ _max_h = _h
# Recenter last row.
_dx = int((PALETTE_WIDTH-_row_w)/2)
for _r in _row:
for _g in self._find_group(_r):
_g.spr.move_relative((_dx, 0))
- return x, y, _max
+ return x, y, _max_h
"""
Layout prototypes in a palette.