Ticket #3388: 0002-Make-the-main-toolbar-the-right-size-SL-3388.patch

File 0002-Make-the-main-toolbar-the-right-size-SL-3388.patch, 2.7 KB (added by manuq, 12 years ago)

Proposed patch

  • gtk3/theme/gtk-widgets.css.em

    From 8a5d065387cf8f912c4a19bc9f05944be9ded29b Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
    Date: Mon, 3 Sep 2012 22:35:02 -0300
    Subject: [PATCH sugar-artwork 2/2] Make the main toolbar the right size - SL
     #3388
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
    
    Set to zero the GtkWidget-focus-padding which was changing the size of
    the buttons, and was noticeable in the toolbar because the toolbar
    buttons were changing the toolbar height.  Use the toolbutton_padding
    variable instead.  It was used before only for the tool buttons
    border-radius, but a look at the gtk2 theme gtkrc shows that its used
    there for the inner-border, which is the padding in gtk3 CSS.  It
    gained 1px to make the toolbar exactly the same height than in the
    gtk2 theme.  I tested this with screenshots in both sugar-100 and
    sugar-72.  I'm attaching them to the ticket.
    
    Signed-off-by: Manuel Quiñones <manuq@laptop.org>
    ---
     gtk3/theme/gtk-widgets.css.em | 10 +++++-----
     1 file changed, 5 insertions(+), 5 deletions(-)
    
    diff --git a/gtk3/theme/gtk-widgets.css.em b/gtk3/theme/gtk-widgets.css.em
    index 96aa3fa..c0749e2 100644
    a b if scaling == "100": 
    2121    bullet_size = 9.5
    2222    font_height = 24
    2323    default_padding = 6
    24     toolbutton_padding = 9
     24    toolbutton_padding = 10
    2525else: # About 72% of the XO size, adjusted so that eg. toolbuttons work
    2626    xo = False
    2727    line_width = 2.0            # 1.62 rounded up
    else: # About 72% of the XO size, adjusted so that eg. toolbuttons work 
    3232    # This is a guess on the font size (Sans 10 at 96 DPI)
    3333    font_height = 17
    3434    default_padding = 4         # 4.32
    35     toolbutton_padding = 6      # 7.68
     35    toolbutton_padding = 7      # 7.68
    3636
    3737
    3838# Radio size used to be:
    icon_large = icon_base * 5 
    7777    -GtkEntry-focus-line-width: 0;
    7878    -GtkScale-focus-line-width: 0;
    7979    -GtkScale-focus-line-width: 0;
    80     -GtkWidget-focus-padding: 3;
     80    -GtkWidget-focus-padding: 0;
    8181    /* 0.05 works good for both the sugar and sugar-xo themes */
    8282    -GtkWidget-cursor-aspect-ratio: 0.05;
    8383
    background-color: @black; 
    527527.toolbar GtkToolButton .button,
    528528.toolbar SugarRadioToolButton *,
    529529SugarPaletteWindowWidget SugarRadioToolButton *,
    530 SugarPaletteWindowWidget GtkToolButton .button{
     530SugarPaletteWindowWidget GtkToolButton .button {
    531531    background-color: transparent;
    532532    border-radius: $(toolbutton_padding)px;
    533     padding: $(default_padding)px;
     533    padding: $(toolbutton_padding)px;
    534534}
    535535
    536536.toolbar GtkToolButton .button:prelight,