From d32523655c7ec28bac93f3583af322d1f05d45f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= Date: Thu, 10 Jan 2013 16:59:49 -0300 Subject: [PATCH] Fix subtoolbars height - SL #4019 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the vertical padding from the box that contain the toolbar, and change the order of drawings in the container widget so that the outline looks right. This has been tested with screenshots, see the gif animation attached to the ticket. Signed-off-by: Manuel QuiƱones Acked-by: Simon Schampijer --- src/sugar3/graphics/toolbarbox.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sugar3/graphics/toolbarbox.py b/src/sugar3/graphics/toolbarbox.py index 8c4e644b..c20f3269 100644 --- a/src/sugar3/graphics/toolbarbox.py +++ b/src/sugar3/graphics/toolbarbox.py @@ -272,6 +272,8 @@ class _Box(Gtk.EventBox): self._toolbar_button = toolbar_button def do_draw(self, cr): + self.get_child().do_draw(self, cr) + button_alloc = self._toolbar_button.get_allocation() cr.set_line_width(style.FOCUS_LINE_WIDTH * 2) @@ -282,12 +284,9 @@ class _Box(Gtk.EventBox): cr.line_to(self.get_allocation().width, 0) cr.stroke() - self.get_child().do_draw(self, cr) - def _setup_page(page_widget, color, hpad): - vpad = style.FOCUS_LINE_WIDTH - page_widget.get_child().set_padding(vpad, vpad, hpad, hpad) + page_widget.get_child().set_padding(0, 0, hpad, hpad) page = _get_embedded_page(page_widget) page.modify_bg(Gtk.StateType.NORMAL, color)