[gtk+/wip/css: 3/37] css: parse 'currentColor' for symbolic colors
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/css: 3/37] css: parse 'currentColor' for symbolic colors
- Date: Mon, 23 Jan 2012 15:35:55 +0000 (UTC)
commit 7362f19cf57e751e9aed547dd550ed972acfd7d5
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 39e1518..8ef5e73 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]