Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/thoughtview.py
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@sugarlabs.org>2009-01-29 16:11:24 (GMT)
committer Tomeu Vizoso <tomeu@sugarlabs.org>2009-01-29 16:11:24 (GMT)
commitc9bd79e9eebe954944f5a1e9406c3503f56e83be (patch)
treefc60ab18d940f748d517f0e7de5993b847b2fdbe /thoughtview.py
parent98d13b0b292ba17ac56e4d133e6c4619c46c7ed7 (diff)
Fix sizing
Diffstat (limited to 'thoughtview.py')
-rw-r--r--thoughtview.py4
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)