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 { |
307 | 307 | |
308 | 308 | .notebook tab { |
309 | 309 | background-color: @selection_grey; |
310 | | color: @white; |
311 | 310 | } |
312 | 311 | |
| 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: */ |
313 | 315 | .notebook tab GtkLabel { |
314 | 316 | color: @white; |
315 | 317 | } |
316 | 318 | |
| 319 | .notebook tab .button GtkLabel { |
| 320 | color: @black; |
| 321 | } |
| 322 | |
317 | 323 | .notebook tab:active { |
318 | 324 | background-color: @toolbar_grey; |
319 | 325 | } |
… |
… |
SugarAlert { |
346 | 352 | color: @white; |
347 | 353 | } |
348 | 354 | |
349 | | SugarAlert GtkLabel { |
350 | | color: @white; |
351 | | } |
352 | | |
353 | 355 | SugarAlert *:insensitive { |
354 | 356 | background-color: @black; |
355 | 357 | } |
… |
… |
SugarHTray * , SugarVTray * { background-color: @toolbar_grey;} |
374 | 376 | |
375 | 377 | SugarPaletteWindowWidget { |
376 | 378 | background-color: @black; |
377 | | } |
378 | | |
379 | | SugarPaletteWindowWidget GtkLabel { |
380 | 379 | color: @white; |
381 | 380 | } |
382 | 381 | |
… |
… |
GtkVSeparator, GtkHSeparator, |
517 | 516 | .toolbar { |
518 | 517 | padding: 0px; |
519 | 518 | background-color: @toolbar_grey; |
520 | | } |
521 | | |
522 | | .toolbar GtkLabel { |
523 | | color: @white; |
| 519 | color: @white; |
524 | 520 | } |
525 | 521 | |
526 | 522 | .toolbar .button, |