Ticket #3983: 0004-GtkScale-Add-margin-to-the-scale-trough-to-recover-t.patch

File 0004-GtkScale-Add-margin-to-the-scale-trough-to-recover-t.patch, 1.8 KB (added by manuq, 12 years ago)
  • gtk3/theme/gtk-widgets.css.em

    From d66fd43814251ba7ffe7f2c4ab765731cd402b51 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
    Date: Tue, 9 Oct 2012 22:00:34 -0300
    Subject: [PATCH artwork 4/4] GtkScale: Add margin to the scale trough to
     recover the original style - SL #3983
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
    
    This is the same thing that current Adwaita theme does in
    gnome-themes-standard to make the trough smaller than the slider.
    
    The margin value is hardcoded to get it right in the XO sugar-100
    theme, but should be calculated later, when we fix the sugar-72 theme.
    It looks like we will need different SVG images for that theme too.
    
    Signed-off-by: Manuel Quiñones <manuq@laptop.org>
    ---
     gtk3/theme/gtk-widgets.css.em | 10 ++++++++++
     1 file changed, 10 insertions(+)
    
    diff --git a/gtk3/theme/gtk-widgets.css.em b/gtk3/theme/gtk-widgets.css.em
    index e6a27b2..e7bf9c3 100644
    a b else: # About 72% of the XO size, adjusted so that eg. toolbuttons work 
    4343# so the SVG displays at the correct size.
    4444# FIXME this only works for 100, has not been tested in 75 resolution
    4545radio_size = 26
     46
     47# FIXME this should be calculated with the radio size and the bullet
     48# size:
     49scale_trough_margin = 8
     50
    4651scale_slider_width = my_floor(2 * subcell_size + line_width)
    4752thickness = my_ceil(line_width)
    4853
    SugarPaletteWindowWidget GtkScrolledWindow * { 
    579584    border-style: solid;
    580585    border-color: @button_grey;
    581586    border-width: $(thickness)px;
     587    margin: $(scale_trough_margin)px 0;
     588}
     589
     590.scale.trough.vertical {
     591    margin: 0 $(scale_trough_margin)px;
    582592}
    583593
    584594.scale.trough:focused {