diff options
author | Walter Bender <walter.bender@gmail.com> | 2011-02-21 21:03:02 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2011-02-21 21:03:02 (GMT) |
commit | 860754f7e871617df9d101a51dc64a69b742a0ba (patch) | |
tree | 1cb02da9fc714e2a702d43fb3e48d612786a51d7 /TurtleArtActivity.py | |
parent | b3db8721a75b4e6845a91567f4d55d2376245960 (diff) |
fixed problem with help label wrap width
Diffstat (limited to 'TurtleArtActivity.py')
-rw-r--r-- | TurtleArtActivity.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py index c9aa9cb..aa8d5bd 100644 --- a/TurtleArtActivity.py +++ b/TurtleArtActivity.py @@ -43,7 +43,8 @@ from gettext import gettext as _ import os.path import tarfile -from TurtleArt.taconstants import PALETTE_NAMES, OVERLAY_LAYER, HELP_STRINGS +from TurtleArt.taconstants import PALETTE_NAMES, OVERLAY_LAYER, HELP_STRINGS, \ + ICON_SIZE from TurtleArt.taexporthtml import save_html from TurtleArt.taexportlogo import save_logo from TurtleArt.tautils import data_to_file, data_to_string, data_from_string, \ @@ -572,7 +573,7 @@ class TurtleArtActivity(activity.Activity): _("Shrink blocks"), self.do_shrink_blocks_cb, view_toolbar_button) self.hover_help_label = self._add_label( _("Move the cursor over the orange palette for help."), - help_toolbar) + help_toolbar, gtk.gdk.screen_width() - 2 * ICON_SIZE) # The palette toolbar is only used with 0.86+ if self.new_sugar_system: @@ -780,10 +781,12 @@ class TurtleArtActivity(activity.Activity): self.tw.paste_offset) self.tw.paste_offset += 20 - def _add_label(self, string, toolbar): + def _add_label(self, string, toolbar, width=None): """ add a label to a toolbar """ label = gtk.Label(string) label.set_line_wrap(True) + if width is not None: + label.set_size_request(width, -1) label.show() toolitem = gtk.ToolItem() toolitem.add(label) |