Use replaceable colors in Crux theme



Here is a first attempt to use replaceable colors allowed by latest
Theme preferences tool.

This is just a first test; values and usage of shade(), darker and
lighter() expressions are just a simple copy from Clearlooks. There are
some comments near each color, showing the previous color in Crux and
the status of the match (OK, NO, ??)

Any help from someone with gtk_color-fu will be appreciated.

PS we want to make Crux theme recolorable, isn't it?
Index: themes/Crux/gtk-2.0/gtkrc
===================================================================
--- themes/Crux/gtk-2.0/gtkrc	(revisione 592)
+++ themes/Crux/gtk-2.0/gtkrc	(copia locale)
@@ -31,9 +31,35 @@
 
 gtk-icon-sizes = "panel-menu=22,22:panel=22,22:gtk-menu=16,16:gtk-large-toolbar=22,22:gtk-button=22,22"
 
+gtk_color_scheme = "fg_color:#000\nbg_color:#c4c6c0\nbase_color:#fff\ntext_color:#000\nselected_bg_color:#75507b\nselected_fg_color:#fff\n"
+
+
 style "default"
 {
+  fg[NORMAL]        = @fg_color           # was 000000 --> OK
+  fg[PRELIGHT]      = @fg_color           # was 000000 --> OK
+  fg[SELECTED]      = @selected_fg_color  # was ffffff --> OK
+  fg[ACTIVE]        = @fg_color           # was 000000 --> OK
+  fg[INSENSITIVE]   = darker (@bg_color)  # was 888a85 --> ??
 
+  bg[NORMAL]        = @bg_color                # was d3d7cf --> NO?
+  bg[PRELIGHT]      = shade (1.02, @bg_color)  # was ededeb --> NO?
+  bg[SELECTED]      = @selected_bg_color       # was 75507b --> OK
+  bg[INSENSITIVE]   = @bg_color                # was c4c6c0 --> OK?
+  bg[ACTIVE]        = shade (0.9, @bg_color)   # was a3a69f --> ??
+
+  base[NORMAL]      = @base_color              # was ffffff --> OK
+  base[PRELIGHT]    = shade (0.95, @bg_color)  # was 000000 --> NO?
+  base[ACTIVE]      = shade (0.9, @selected_bg_color)  # undefined
+  base[SELECTED]    = @selected_bg_color       # 75507b --> OK
+  base[INSENSITIVE] = @bg_color                # dddddd --> NO
+
+  text[NORMAL]      = @text_color         # was 000000 --> OK
+  text[PRELIGHT]    = @text_color         # was 000000 --> OK
+  text[ACTIVE]      = @selected_fg_color  # was 000000 --> OK 
+  text[SELECTED]    = @selected_fg_color  # was undefined
+  text[INSENSITIVE] = darker (@bg_color)  # was 888a85 --> ??
+
   GtkRange::slider_width = 13
   GtkRange::stepper_size = 13
   GtkRange::trough_border = 1
@@ -52,28 +78,6 @@
 
   GtkScrollbar::min_slider_length = 25
 
-  fg[NORMAL] = "#000000"
-  fg[ACTIVE] = "#000000"
-  fg[PRELIGHT] = "#000000"
-  fg[SELECTED] = "#ffffff"
-  fg[INSENSITIVE] = "#888a85"
-
-  bg[NORMAL] = "#d3d7cf"
-  bg[ACTIVE] = "#a3a69f"
-  bg[PRELIGHT] = "#ededeb"
-  bg[SELECTED] = "#75507b"
-  bg[INSENSITIVE] = "#c4c6c0"
-
-  text[NORMAL] = "#000000"
-  text[ACTIVE] = "#000000"
-  text[PRELIGHT] = "#000000"
-  text[INSENSITIVE] = "#888a85"
-
-  base[NORMAL] = "#ffffff"
-  base[PRELIGHT] = "#000000"
-  base[INSENSITIVE] = "#dddddd"
-  base[SELECTED] = "#75507b"
-
   engine "crux-engine" {  }
 }
 
@@ -83,8 +87,8 @@
 # Style used for (prelighted) menu items
 style "menuitem"
 {
-  fg[PRELIGHT] = "#ffffff"
-  bg[PRELIGHT] = "#75507b"
+  fg[PRELIGHT] = @selected_fg_color # was 000000 --> OK
+  bg[PRELIGHT] = @selected_bg_color # was 75507b --> OK
 }
 
 class "GtkMenuItem" style "menuitem"
@@ -116,7 +120,7 @@
 
 style "trough"
 {
-   bg[NORMAL] = "#babdb6"
+   bg[NORMAL] =  darker (@bg_color) # was babdb6 --> ??
 }
 class "GtkProgressBar" style "trough"
 


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