Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Quiñones <manuq@laptop.org>2013-01-10 19:59:49 (GMT)
committer Manuel Quiñones <manuq@laptop.org>2013-01-23 13:48:06 (GMT)
commitd32523655c7ec28bac93f3583af322d1f05d45f5 (patch)
tree12ebc9a38806e9dd4d9e927199921614b8dec6c9
parent4199c0596b70e4a0c939849cc9eba72f6a722e55 (diff)
Fix subtoolbars height - SL #4019
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 <manuq@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org>
-rw-r--r--src/sugar3/graphics/toolbarbox.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/sugar3/graphics/toolbarbox.py b/src/sugar3/graphics/toolbarbox.py
index 8c4e644..c20f326 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)