Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2010-09-23 11:17:38 (GMT)
committer Walter Bender <walter@sugarlabs.org>2010-09-23 11:17:38 (GMT)
commit06c8599b1628ac11e2f30a7a9de4875acee662ec (patch)
tree115d203b66b45a6b0864ea96c55a4033cfb95e4f /TurtleArt
parentf1dade66d9563be2126c16c54b469a5b91148834 (diff)
expand constant should be independent of block scale
Diffstat (limited to 'TurtleArt')
-rw-r--r--TurtleArt/tawindow.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index e311c01..4c9c1cd 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -1400,7 +1400,7 @@ class TurtleArtWindow():
if hide_button_hit(blk.spr, x, y):
dx = blk.reset_x()
elif show_button_hit(blk.spr, x, y):
- dx = 20
+ dx = 24
blk.expand_in_x(dx)
else:
dx = 0
@@ -1538,11 +1538,11 @@ class TurtleArtWindow():
break
blk = blk.connections[0]
if blk.connections[1].name == 'myfunc2arg':
- dy = 20 * self.block_scale + blk.connections[1].ey - blk.ey
+ dy = 40 + blk.connections[1].ey - blk.ey
elif blk.connections[1].name == 'myfunc3arg':
- dy = 30 * self.block_scale + blk.connections[1].ey - blk.ey
+ dy = 60 + blk.connections[1].ey - blk.ey
else:
- dy = 10 * self.block_scale + blk.connections[1].ey - blk.ey
+ dy = 20 + blk.connections[1].ey - blk.ey
blk.expand_in_y(dy)
if dy != 0:
group = find_group(blk.connections[1])
@@ -1650,14 +1650,11 @@ class TurtleArtWindow():
if (selected_block.name in EXPANDABLE_BLOCKS or
selected_block.name in NUMBER_STYLE_VAR_ARG):
if selected_block.name == 'myfunc2arg':
- dy = 20 * self.block_scale + selected_block.ey - \
- best_destination.ey
+ dy = 40 + selected_block.ey - best_destination.ey
elif selected_block.name == 'myfunc3arg':
- dy = 30 * self.block_scale + selected_block.ey - \
- best_destination.ey
+ dy = 60 + selected_block.ey - best_destination.ey
else:
- dy = 10 * self.block_scale + selected_block.ey - \
- best_destination.ey
+ dy = 20 + selected_block.ey - best_destination.ey
best_destination.expand_in_y(dy)
else:
if best_destination.ey > 0: