From e9d1d452af3c5cdbd4df1e5b9b550e3280a4c2a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
Date: Thu, 10 Jan 2013 16:59:49 -0300
Subject: [PATCH toolkit] Fix subtoolbars height - SL #4019
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
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>
---
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 8c4e644..c20f326 100644
a
|
b
|
class _Box(Gtk.EventBox): |
272 | 272 | self._toolbar_button = toolbar_button |
273 | 273 | |
274 | 274 | def do_draw(self, cr): |
| 275 | self.get_child().do_draw(self, cr) |
| 276 | |
275 | 277 | button_alloc = self._toolbar_button.get_allocation() |
276 | 278 | |
277 | 279 | cr.set_line_width(style.FOCUS_LINE_WIDTH * 2) |
… |
… |
class _Box(Gtk.EventBox): |
282 | 284 | cr.line_to(self.get_allocation().width, 0) |
283 | 285 | cr.stroke() |
284 | 286 | |
285 | | self.get_child().do_draw(self, cr) |
286 | | |
287 | 287 | |
288 | 288 | def _setup_page(page_widget, color, hpad): |
289 | | vpad = style.FOCUS_LINE_WIDTH |
290 | | page_widget.get_child().set_padding(vpad, vpad, hpad, hpad) |
| 289 | page_widget.get_child().set_padding(0, 0, hpad, hpad) |
291 | 290 | |
292 | 291 | page = _get_embedded_page(page_widget) |
293 | 292 | page.modify_bg(Gtk.StateType.NORMAL, color) |