From 18bfff32531e13d18c53f9a990fdf48a2cd52673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sat, 27 Sep 2014 18:25:31 +0300 Subject: theme: Allow using custom colors from the GTK+ theme Add an additional color type to pick up colors defined with @define-color in the GTK+ theme's CSS: gtk:custom(name,fallback) (where "name" refers to the name defined in GTK+'s CSS, and fallback refers to an alternative color spec which is used when the color referenced by "name" is not found) The main intent of the change is to allow designers to improve Adwaita's dark theme variant without having to compromise on colors which work in the light variant as well. https://bugzilla.gnome.org/show_bug.cgi?id=648709 NOTE: Patch copied from mutter and adapted for metacity. --- src/ui/theme.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ui/theme.h') diff --git a/src/ui/theme.h b/src/ui/theme.h index e248b3b3..56144edc 100644 --- a/src/ui/theme.h +++ b/src/ui/theme.h @@ -232,6 +232,7 @@ typedef enum { META_COLOR_SPEC_BASIC, META_COLOR_SPEC_GTK, + META_COLOR_SPEC_GTK_CUSTOM, META_COLOR_SPEC_BLEND, META_COLOR_SPEC_SHADE } MetaColorSpecType; @@ -261,6 +262,10 @@ struct _MetaColorSpec MetaGtkColorComponent component; GtkStateFlags state; } gtk; + struct { + char *color_name; + MetaColorSpec *fallback; + } gtkcustom; struct { MetaColorSpec *foreground; MetaColorSpec *background; -- cgit v1.2.1