diff options
author | Michael Natterer <mitch@imendio.com> | 2005-11-23 10:33:58 +0000 |
---|---|---|
committer | Michael Natterer <mitch@src.gnome.org> | 2005-11-23 10:33:58 +0000 |
commit | de3155a4c2c8321b10e561e87e7f8086dd13c26b (patch) | |
tree | 4c3b1936922cfb9749b7a668bd799a17826a44ca /tests/testgtkrc | |
parent | dfa4870b74be2ade513ffda504cd4fdfede19bb3 (diff) | |
download | gtk+-de3155a4c2c8321b10e561e87e7f8086dd13c26b.tar.gz |
Added symbolic themable colors. Patch is a merged version of proposals
2005-11-23 Michael Natterer <mitch@imendio.com>
Added symbolic themable colors. Patch is a merged version of
proposals from Matthias and maemo-gtk. Fixes bug #114355.
* configure.in: require glib >= 2.9.1 for refcountable hashtables.
* gtk/gtksettings.c: added property "color-scheme" which is a
string defining colors like "foreground:black\nbackground:grey".
Automatically provide a name->GdkColor hash table mapping for the
color scheme.
* gtk/gtkrc.[ch]: added list of color hashes that works like the
list of icon factories. Append the color scheme hash from
GtkSettings if it exists. Extended gtkrc syntax to allow defining
and referencing of logical colors. Also allow to modulate colors
in gtkrc by using arbitrary expressions of mix(), shade(),
lighter() and darker(). Added internal function
_gtk_rc_style_get_color_hashes().
* gtk/gtkstyle.[ch]: keep a private list of color hashes around.
Get the list from _gtk_rc_style_get_color_hashes(). Export
internal function _gtk_style_shade() (used by above color
expressions). Added public API gtk_style_lookup_color() which
looks up a logical color by name.
* gtk/gtk.symbols: add gtk_style_lookup_color
* tests/testgtkrc: use symbolic colors for making
the scrollbars red.
Diffstat (limited to 'tests/testgtkrc')
-rw-r--r-- | tests/testgtkrc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/testgtkrc b/tests/testgtkrc index dbe3acfa74..f711ae79bd 100644 --- a/tests/testgtkrc +++ b/tests/testgtkrc @@ -109,9 +109,17 @@ style "curve" fg[NORMAL] = { 58000, 0, 0 } # red } -style "red-bar" +style "red-bar-parent" { - bg[PRELIGHT] = { 0.95, .55, 0.55 } + color["my-red"] = "red" + color["my-other-red"] = { 0.95, .55, 0.55 } +} + +style "red-bar" = "red-bar-parent" +{ + color["my-light-red"] = lighter (lighter (@my-red)) + + bg[PRELIGHT] = @my-light-red } # override testgtk2, introduce the green color in the button list |