Ticket #4019: 0001-Fix-subtoolbars-height-SL-4019.patch

File 0001-Fix-subtoolbars-height-SL-4019.patch, 1.7 KB (added by manuq, 10 years ago)

Proposed fix.

  • src/sugar3/graphics/toolbarbox.py

    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): 
    272272        self._toolbar_button = toolbar_button
    273273
    274274    def do_draw(self, cr):
     275        self.get_child().do_draw(self, cr)
     276
    275277        button_alloc = self._toolbar_button.get_allocation()
    276278
    277279        cr.set_line_width(style.FOCUS_LINE_WIDTH * 2)
    class _Box(Gtk.EventBox): 
    282284        cr.line_to(self.get_allocation().width, 0)
    283285        cr.stroke()
    284286
    285         self.get_child().do_draw(self, cr)
    286 
    287287
    288288def _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)
    291290
    292291    page = _get_embedded_page(page_widget)
    293292    page.modify_bg(Gtk.StateType.NORMAL, color)