Ticket #3974: 0002-Don-t-set-color-for-GtkLabel-do-it-in-containers-ins.patch

File 0002-Don-t-set-color-for-GtkLabel-do-it-in-containers-ins.patch, 2.3 KB (added by manuq, 12 years ago)

Patch that fixes the color of the label inside buttons. I have to investigate how to change the icon color.

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

    From a7ed1e64c447b895e2bb1de023b3d2aa0ae9f297 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Manuel=20Qui=C3=B1ones?= <manuq@laptop.org>
    Date: Tue, 2 Oct 2012 01:08:37 -0300
    Subject: [PATCH artwork 2/2] Don't set color for GtkLabel, do it in
     containers instead - SL #3974
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    Mail-Followup-To: <sugar-devel@lists.sugarlabs.org>
    
    An example of why this is wrong is #3974, in which removing:
    
    SugarAlert GtkLabel { color: @white; }
    
    makes the buttons label recover the right color, as specified in the
    rule .buttons {...}
    
    The only exception is in the notebook tabs: setting color there
    doesn't paint the labels, so we have to add a rule for labels in tabs,
    and then add another rule to make sure labels inside buttons inside
    tabs get the right black color.  This patch also adds a comment in the
    CSS explaining that.
    
    Signed-off-by: Manuel Quiñones <manuq@laptop.org>
    ---
     gtk3/theme/gtk-widgets.css.em | 20 ++++++++------------
     1 file changed, 8 insertions(+), 12 deletions(-)
    
    diff --git a/gtk3/theme/gtk-widgets.css.em b/gtk3/theme/gtk-widgets.css.em
    index 56c8678..b9a39d5 100644
    a b GtkComboBox .separator { 
    307307
    308308.notebook tab {
    309309    background-color: @selection_grey;
    310     color: @white;
    311310}
    312311
     312/* Setting white color to the tab labels using only the previous rule */
     313/* doesn't work, so we have to set white color to the GtkLabel, and make */
     314/* sure the buttons get black color in the next two rules: */
    313315.notebook tab GtkLabel {
    314316    color: @white;
    315317}
    316318
     319.notebook tab .button GtkLabel {
     320    color: @black;
     321}
     322
    317323.notebook tab:active {
    318324    background-color: @toolbar_grey;
    319325}
    SugarAlert { 
    346352    color: @white;
    347353}
    348354
    349 SugarAlert GtkLabel {
    350     color: @white;
    351 }
    352 
    353355SugarAlert *:insensitive {
    354356    background-color: @black;
    355357}
    SugarHTray * , SugarVTray * { background-color: @toolbar_grey;} 
    374376
    375377SugarPaletteWindowWidget {
    376378    background-color: @black;
    377 }
    378 
    379 SugarPaletteWindowWidget GtkLabel {
    380379    color: @white;
    381380}
    382381
    GtkVSeparator, GtkHSeparator, 
    517516.toolbar {
    518517padding: 0px;
    519518background-color: @toolbar_grey;
    520 }
    521 
    522 .toolbar GtkLabel {
    523     color: @white;
     519color: @white;
    524520}
    525521
    526522.toolbar .button,