Ticket #3406: 0001-Theme-GtkSpinButton-buttons-SL-3406.2.patch

File 0001-Theme-GtkSpinButton-buttons-SL-3406.2.patch, 2.4 KB (added by manuq, 12 years ago)

Second version

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

    From 75da73c716e4209e572078ac32f72da4dab9c5be Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
    Date: Mon, 4 Jun 2012 16:18:44 -0300
    Subject: [PATCH v2 sugar-artwork] Theme GtkSpinButton buttons SL #3406
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
    
    - Set border radius to the buttons, so the layout is like
    (value [-|+)) .
    
    - Add a border between the buttons.
    
    - Remove unneeded padding.
    
    - Sets the active state colors, so the button blinks in black and
      white.
    
    - Remove unneeded variables and calculations.
    
    Signed-off-by: Manuel Quiñones <manuq@laptop.org>
    ---
     gtk3/theme/gtk-widgets.css.em |   32 ++++++++++++--------------------
     1 file changed, 12 insertions(+), 20 deletions(-)
    
    diff --git a/gtk3/theme/gtk-widgets.css.em b/gtk3/theme/gtk-widgets.css.em
    index 7186651..30ba2ed 100644
    a b icon_large = icon_base * 5 
    155155    padding: $(border)px $(border)px $(border)px $(border)px;
    156156
    157157    border-radius: $(2*subcell_size)px;
     158    border-style: solid;
    158159    background-color: @button_grey;
    159160    color: @white;
    160161}
    icon_large = icon_base * 5 
    171172
    172173/* Spin buttons */
    173174
    174 ${ spin_ythickness = my_ceil(3*subcell_size - font_height) }
    175 ${ spin_xthickness = subcell_size }
    176 ${ spin_btn_ythickness = spin_ythickness }
    177 ${ spin_btn_xthickness = subcell_size * 2 }
    178 
    179 .spinbutton.button,
    180 .spinbutton.button:focused,
    181 .spinbutton.button:active {
    182     padding: $(spin_ythickness)px $(spin_xthickness)px;
    183     border-color: @button_grey;
    184     border-width: $(thickness)px;
     175.spinbutton.button {
     176    border-radius: 0px;
     177    border-width: 0px;
    185178    background-color: @button_grey;
    186179    color: @white;
    187180}
    188181
     182.spinbutton.button:last-child {
     183    border-radius: 0px $(subcell_size)px $(subcell_size)px 0px;
     184    border-width: 0px 0px 0px $(thickness)px;
     185    border-color: @selection_grey;
     186}
     187
     188
    189189.spinbutton.button:active {
    190     background-color: @white;
    191     color: @black;
    192     border-color: @white;
     190    background-color: @black;
    193191}
    194192
    195193.spinbutton.button:insensitive {
    196194    background-color: @selection_grey;
    197195}
    198196
    199 .spinbutton.button:focused,
    200 .spinbutton.button:focused:prelight,
    201 .spinbutton.button:focused:insensitive {
    202     border-color: @white;
    203 }
    204 
    205197/* Toggle buttons */
    206198
    207199GtkToggleButton.button:active {