[gtk+/wip/css: 3/36] css: parse 'currentColor' for symbolic colors
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/css: 3/36] css: parse 'currentColor' for symbolic colors
- Date: Wed, 18 Jan 2012 09:38:45 +0000 (UTC)
commit 11b7a1a14bb585660cd7e660a9bbc08cb35731eb
Author: Benjamin Otte <otte redhat com>
Date: Sat Jan 14 04:05:19 2012 +0100
css: parse 'currentColor' for symbolic colors
gtk/gtkcssstylefuncs.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcssstylefuncs.c b/gtk/gtkcssstylefuncs.c
index 182eb26..55291c6 100644
--- a/gtk/gtkcssstylefuncs.c
+++ b/gtk/gtkcssstylefuncs.c
@@ -321,9 +321,16 @@ symbolic_color_value_parse (GtkCssParser *parser,
{
GtkSymbolicColor *symbolic;
- symbolic = _gtk_css_parser_read_symbolic_color (parser);
- if (symbolic == NULL)
- return FALSE;
+ if (_gtk_css_parser_try (parser, "currentcolor", TRUE))
+ {
+ symbolic = gtk_symbolic_color_ref (_gtk_symbolic_color_get_current_color ());
+ }
+ else
+ {
+ symbolic = _gtk_css_parser_read_symbolic_color (parser);
+ if (symbolic == NULL)
+ return FALSE;
+ }
g_value_take_boxed (value, symbolic);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]