diff options
author | Alexander Larsson <alexl@redhat.com> | 2011-11-18 10:16:38 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2011-11-18 10:16:38 +0100 |
commit | 3309639c1c7b8b377356b4b90f1cd49cc75dc7b3 (patch) | |
tree | 51d67e5bbbbe36b757cd95214fc20fb2c9548c69 /gtk/gtkcssparser.c | |
parent | ca829b484c48d9ccbf12032a7f45ae910fd5ace8 (diff) | |
download | gtk+-3309639c1c7b8b377356b4b90f1cd49cc75dc7b3.tar.gz |
Add support for win32 theme colors as symbolic colors
Diffstat (limited to 'gtk/gtkcssparser.c')
-rw-r--r-- | gtk/gtkcssparser.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gtk/gtkcssparser.c b/gtk/gtkcssparser.c index 2d6a4df3d0..ff44c35748 100644 --- a/gtk/gtkcssparser.c +++ b/gtk/gtkcssparser.c @@ -20,6 +20,7 @@ #include "config.h" #include "gtkcssparserprivate.h" +#include "gtkwin32themeprivate.h" #include <errno.h> #include <string.h> @@ -575,7 +576,8 @@ typedef enum { COLOR_DARKER, COLOR_SHADE, COLOR_ALPHA, - COLOR_MIX + COLOR_MIX, + COLOR_WIN32 } ColorType; static GtkSymbolicColor * @@ -644,6 +646,12 @@ gtk_css_parser_read_symbolic_color_function (GtkCssParser *parser, symbolic = gtk_symbolic_color_new_literal (&rgba); } + else if (color == COLOR_WIN32) + { + symbolic = _gtk_win32_theme_color_parse (parser); + if (symbolic == NULL) + return NULL; + } else { child1 = _gtk_css_parser_read_symbolic_color (parser); @@ -769,7 +777,8 @@ _gtk_css_parser_read_symbolic_color (GtkCssParser *parser) { GtkSymbolicColor *symbolic; guint color; - const char *names[] = {"rgba", "rgb", "lighter", "darker", "shade", "alpha", "mix" }; + const char *names[] = {"rgba", "rgb", "lighter", "darker", "shade", "alpha", "mix", + GTK_WIN32_THEME_SYMBOLIC_COLOR_NAME}; char *name; g_return_val_if_fail (GTK_IS_CSS_PARSER (parser), NULL); |