diff options
author | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-01-29 16:11:24 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@sugarlabs.org> | 2009-01-29 16:11:24 (GMT) |
commit | c9bd79e9eebe954944f5a1e9406c3503f56e83be (patch) | |
tree | fc60ab18d940f748d517f0e7de5993b847b2fdbe /thoughtview.py | |
parent | 98d13b0b292ba17ac56e4d133e6c4619c46c7ed7 (diff) |
Fix sizing
Diffstat (limited to 'thoughtview.py')
-rw-r--r-- | thoughtview.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/thoughtview.py b/thoughtview.py index 478dd00..a079476 100644 --- a/thoughtview.py +++ b/thoughtview.py @@ -86,9 +86,13 @@ class ThoughtView(Box): layout.set_text(_('Untitled')) width, height = layout.get_pixel_size() + #logging.debug('_draw_label %r %r %r' % (layout.get_text(), width, height)) self.min_width = width + self._PADDING * 2 self.min_height = height + self._PADDING * 2 + self.width = max(self.width, self.min_width) + self.height = max(self.height, self.min_height) + x = self._PADDING y = self._PADDING context.cairo.translate(x, y) |