From 86ba52eadd4c70c1c87f179965f1a2a4ec030e5e Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Wed, 9 Sep 2009 08:54:08 +0000 Subject: [PATCH] Secondary toolbar widget should set a minimum height #1304 --- src/sugar/graphics/toolbarbox.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sugar/graphics/toolbarbox.py b/src/sugar/graphics/toolbarbox.py index a7167344..430ff672 100644 --- a/src/sugar/graphics/toolbarbox.py +++ b/src/sugar/graphics/toolbarbox.py @@ -54,6 +54,7 @@ class ToolbarButton(ToolButton): self.page_widget = None return self.page_widget = _embody_page(_Box, page) + self.page_widget.set_size_request(-1, style.GRID_CELL_SIZE) self.page_widget.toolbar_button = self page.show() if self.props.palette is None: @@ -79,7 +80,8 @@ class ToolbarButton(ToolButton): and self.toolbar_box.expanded_button == self def popdown(self): - self.props.palette.popdown(immediate=True) + if self.props.palette is not None: + self.props.palette.popdown(immediate=True) def set_expanded(self, expanded): self.popdown()