Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
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
parenta09068704b3177e48b1195f0f01f0ace412a02ea (diff)
cleaning up loose ends
-rw-r--r--taconstants.py4
-rw-r--r--tawindow.py26
2 files changed, 15 insertions, 15 deletions
diff --git a/taconstants.py b/taconstants.py
index 9df0778..40dcdfc 100644
--- a/taconstants.py
+++ b/taconstants.py
@@ -107,7 +107,7 @@ TOP_LAYER = 1000
PALETTE_NAMES = ['turtle', 'pen', 'colors', 'numbers', 'flow', 'blocks',
'extras', 'portfolio', 'trash']
-PALETTES = [['forward', 'back', 'clean', 'left', 'right', 'show',
+PALETTES = [['clean', 'forward', 'back', 'show', 'left', 'right',
'seth', 'setxy', 'heading', 'xcor', 'ycor', 'setscale',
'arc', 'scale', 'leftpos', 'toppos', 'rightpos',
'bottompos'],
@@ -145,7 +145,7 @@ BOX_COLORS = {'red':["#FF0000","#A00000"],'orange':["#FFD000","#AA8000"],
'purple':["#FF00FF","#A000A0"]}
PALETTE_HEIGHT = 120
-PALETTE_WIDTH = 180
+PALETTE_WIDTH = 175
SELECTOR_WIDTH = 55
ICON_SIZE = 55
SELECTED_COLOR = "#0000FF"
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.