[gtk+] GtkCssProvider: Make default style depend more on custom colors.



commit 0bd81ef7109fd7110f22c3f102b0107218ccca71
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Oct 25 13:55:56 2010 +0200

    GtkCssProvider: Make default style depend more on custom colors.

 gtk/gtkcssprovider.c |   47 +++++++++++++++++++++++++----------------------
 1 files changed, 25 insertions(+), 22 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index 32d699f..a4c7732 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -2823,35 +2823,39 @@ gtk_css_provider_get_default (void)
         "  foreground-color: @fg_color;\n"
         "  text-color: @text_color; \n"
         "  base-color: @base_color; \n"
-        "  border-color: #898089;\n"
+        "  border-color: shade (@bg_color, 0.7);\n"
         "  padding: 2 2; \n"
         "}\n"
         "\n"
         "*:prelight {\n"
-        "  background-color: #eeebe7;\n"
-        "  foreground-color: #000000;\n"
-        "  text-color: #eeebe7; \n"
-        "  base-color: #ffffff; \n"
+        "  background-color: shade (@bg_color, 2.0);\n"
+        "  foreground-color: shade (@fg_color, 1.3);\n"
+        "  text-color: @selected_fg_color;\n"
+        "  base-color: @selected_bg_color;\n"
         "}\n"
         "\n"
         "*:selected {\n"
-        "  background-color: #4b6983;\n"
-        "  foreground-color: #ffffff;\n"
-        "  base-color: #4b6983;\n"
-        "  text-color: #ffffff;\n"
+        "  background-color: @selected_bg_color;\n"
+        "  foreground-color: @selected_fg_color;\n"
         "}\n"
         "\n"
         "*:insensitive {\n"
-        "  background-color: #dcdad5;\n"
-        "  foreground-color: #757575;\n"
+        "  background-color: shade (@bg_color, 0.7);\n"
+        "  foreground-color: shade (@fg_color, 0.7);\n"
         "}\n"
         "\n"
         "GtkTreeView, GtkIconView {\n"
-        "  background-color: #ffffff; \n"
+        "  background-color: @base_color;\n"
+        "  foreground-color: @text_color;\n"
+        "}\n"
+        "\n"
+        "GtkTreeView > row {\n"
+        "  background-color: @base_color;\n"
+        "  foreground-color: @text_color;\n"
         "}\n"
         "\n"
         "GtkTreeView > row:nth-child(odd) { \n"
-        "  background-color: shade(#ffffff, 0.93); \n"
+        "  background-color: shade (@base_color, 0.93); \n"
         "}\n"
         "\n"
         ".tooltip {\n"
@@ -2859,10 +2863,6 @@ gtk_css_provider_get_default (void)
         "  foreground-color: @tooltip_fg_color; \n"
         "}\n"
         "\n"
-        "GtkToggleButton:prelight {\n"
-        "  text-color: #000; \n"
-        "}\n"
-        "\n"
         ".button,\n"
         ".slider {\n"
         "  border-style: outset; \n"
@@ -2870,13 +2870,17 @@ gtk_css_provider_get_default (void)
         "}\n"
         "\n"
         ".button:active {\n"
-        "  background-color: #c4c2bd;\n"
-        "  foreground-color: #000000;\n"
-        "  text-color: #c4c2bd; \n"
-        "  base-color: #9c9a94; \n"
+        "  background-color: shade (@bg_color, 0.7);\n"
         "  border-style: inset; \n"
         "}\n"
         "\n"
+        ".button:prelight,\n"
+        ".slider:prelight {\n"
+        "  background-color: @selected_bg_color;\n"
+        "  foreground-color: @selected_fg_color;\n"
+        "  border-color: shade (@selected_bg_color, 0.7);\n"
+        "}\n"
+        "\n"
         ".trough {\n"
         "  border-style: inset;\n"
         "  border-width: 1;\n"
@@ -2890,7 +2894,6 @@ gtk_css_provider_get_default (void)
         ".viewport {\n"
         "  border-style: inset;\n"
         "  border-width: 2;\n"
-        "  border-color: #9a909a;\n"
         "}\n"
         "\n";
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]