Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TurtleArt/tablock.py28
-rw-r--r--plugins/turtle_blocks_extras/turtle_blocks_extras.py3
2 files changed, 19 insertions, 12 deletions
diff --git a/TurtleArt/tablock.py b/TurtleArt/tablock.py
index 2ead410..bb78b9d 100644
--- a/TurtleArt/tablock.py
+++ b/TurtleArt/tablock.py
@@ -531,23 +531,29 @@ class Block:
debug_output('WARNING: unknown block name %s' % (self.name))
n = 0
for i in range(n):
+ if i > 0:
+ size = int(self._font_size[1] + 0.5)
+ else:
+ size = int(self._font_size[0] + 0.5)
if self.name in block_styles['compare-porch-style']:
- self.spr.set_label_attributes(int(self._font_size[0] + 0.5),
- True, 'center', 'bottom', i=i)
+ self.spr.set_label_attributes(size, True, 'center', 'bottom',
+ i=i)
elif self.name in block_styles['number-style-porch']:
- self.spr.set_label_attributes(int(self._font_size[0] + 0.5),
- True, 'right', 'bottom', i=i)
+ self.spr.set_label_attributes(size, True, 'right', 'bottom',
+ i=i)
elif self.name in EXPANDABLE_FLOW:
self._calc_moving_labels(i)
elif i == 1: # top
- self.spr.set_label_attributes(int(self._font_size[1] + 0.5),
- True, 'right', 'top', i=i)
- elif i == 2: # bottom
- self.spr.set_label_attributes(int(self._font_size[1] + 0.5),
- True, 'right', 'bottom', i=i)
+ self.spr.set_label_attributes(size, True, 'right', 'top', i=i)
+ elif i > 0 and i == n - 1: # bottom
+ self.spr.set_label_attributes(size, True, 'right', 'bottom',
+ i=i)
+ elif i > 0:
+ self.spr.set_label_attributes(size, True, 'right', 'middle',
+ i=i)
else:
- self.spr.set_label_attributes(int(self._font_size[0] + 0.5),
- True, 'center', 'middle', i=i)
+ self.spr.set_label_attributes(size, True, 'center', 'middle',
+ i=i)
def _calc_moving_labels(self, i):
''' Some labels move as blocks change shape/size '''
diff --git a/plugins/turtle_blocks_extras/turtle_blocks_extras.py b/plugins/turtle_blocks_extras/turtle_blocks_extras.py
index ff9eebe..606a632 100644
--- a/plugins/turtle_blocks_extras/turtle_blocks_extras.py
+++ b/plugins/turtle_blocks_extras/turtle_blocks_extras.py
@@ -313,7 +313,8 @@ complete'))
palette.add_block('sinewave',
style='basic-style-3arg',
# TRANS: pitch, duration, amplitude
- label=[_('sinewave'), _('pitch'), _('duration'), ''],
+ label=[_('sinewave') + '\n\n', _('pitch'),
+ _('amplitude'), _('duration')],
prim_name='sinewave',
default=[1000, 5000, 1],
help_string=_('plays a sinewave at frequency, \