diff options
author | Walter Bender <walter@sugarlabs.org> | 2013-05-10 01:24:26 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2013-05-10 01:24:26 (GMT) |
commit | cfcd23ffed0000bcb1896e6fd1b4e5778477893d (patch) | |
tree | 3256d4c080335fc1c0aed9b996c7278a9bee7b9e /TurtleArtActivity.py | |
parent | 73b8d60b8d895b23b79fe5de4cf1fc93a14c1330 (diff) |
check for overflow < 1v176
Diffstat (limited to 'TurtleArtActivity.py')
-rw-r--r-- | TurtleArtActivity.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/TurtleArtActivity.py b/TurtleArtActivity.py index 976d79a..4cd1e80 100644 --- a/TurtleArtActivity.py +++ b/TurtleArtActivity.py @@ -815,9 +815,8 @@ class TurtleArtActivity(activity.Activity): if len(palette_names) > max_palettes: max_palettes -= 1 # Make room for the palette button overflow = len(palette_names) - max_palettes - if overflow < 0: - overflow = 1 # Force overflow to be positive - if gtk.gdk.screen_width() - style.GRID_CELL_SIZE < \ + if overflow < 1 or \ + gtk.gdk.screen_width() - style.GRID_CELL_SIZE < \ int(overflow * (style.GRID_CELL_SIZE + 2)): width = gtk.gdk.screen_width() - style.GRID_CELL_SIZE height = int(style.GRID_CELL_SIZE * 1.5) |