summaryrefslogtreecommitdiff
path: root/gtk/gtkstyleproperties.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2011-11-15 20:52:45 +0100
committerAlexander Larsson <alexl@redhat.com>2011-11-17 12:29:03 +0100
commitabe6598a13ed1b86db0f315f08b27dad9172c864 (patch)
treea497f1713f67447f3e2b2f1b1c54c1e88bb68c82 /gtk/gtkstyleproperties.c
parent8b644b40b1817fc0f93b6e061c8f70ef03e5ff59 (diff)
downloadgtk+-abe6598a13ed1b86db0f315f08b27dad9172c864.tar.gz
Add initial cut at win32 theme support for CSS
We now support -gtk-win32-theme-part(class,part,state) in background and border-image CSS properties. This renders the corresponding theme part using DrawThemeBackground() and acts as a base for a CSS based windows theme. Note that we build the parsing code even on non-win32 so that all themese will parse the same on all arches. We draw pink instead of the actual theme parts on non-win32 though.
Diffstat (limited to 'gtk/gtkstyleproperties.c')
-rw-r--r--gtk/gtkstyleproperties.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk/gtkstyleproperties.c b/gtk/gtkstyleproperties.c
index 318280277a..8b931ad20a 100644
--- a/gtk/gtkstyleproperties.c
+++ b/gtk/gtkstyleproperties.c
@@ -37,6 +37,8 @@
#include "gtkstylepropertyprivate.h"
#include "gtkintl.h"
+#include "gtkwin32themeprivate.h"
+
/**
* SECTION:gtkstyleproperties
* @Short_description: Store for style property information
@@ -465,9 +467,10 @@ _gtk_style_properties_set_property_by_property (GtkStyleProperties *props,
}
else if (style_prop->pspec->value_type == CAIRO_GOBJECT_TYPE_PATTERN)
{
- /* Allow GtkGradient as a substitute */
+ /* Allow GtkGradient and theme part as a substitute */
g_return_if_fail (value_type == CAIRO_GOBJECT_TYPE_PATTERN ||
- value_type == GTK_TYPE_GRADIENT);
+ value_type == GTK_TYPE_GRADIENT ||
+ value_type == GTK_TYPE_WIN32_THEME_PART);
}
else if (style_prop->pspec->value_type == G_TYPE_INT)
{