diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c index 0134522ba3..a6871ade86 100644 --- a/gtk/gtkcssprovider.c +++ b/gtk/gtkcssprovider.c @@ -505,6 +505,28 @@ * color-stop (1, @green)) * * + * + * Text shadow + * + * A shadow list can be applied to text or symbolic icons, using the CSS3 + * text-shadow syntax, as defined in + * the CSS3 specification. + * + * + * A text shadow is specified using the syntax + * text-shadow: @horizontal_offset @vertical_offset [ @blur_radius ] @color + * The offset of the shadow is specified with the @horizontal_offset and @vertical_offset + * parameters. The optional blur radius is parsed, but it is currently not rendered by + * the GTK+ theming engine. + * + * + * To set multiple shadows on an element, you can specify a comma-separated list + * of shadow elements in the text-shadow property. Shadows are always rendered + * front-back, i.e. the first shadow specified is on top of the others. Shadows + * can thus overlay each other, but they can never overlay the text itself, + * which is always rendered on top of the shadow layer. + * + * * * Border images * @@ -693,6 +715,11 @@ * border-image: url("/path/to/image.png") 3 4 4 3 repeat stretch; * * + * text-shadow + * shadow list (see above) + * #GtkTextShadow + * text-shadow: 1 1 0 blue, -4 -4 red; + * * * transition * transition (see above) diff --git a/gtk/gtkstyleproperties.c b/gtk/gtkstyleproperties.c index 27e73929da..88467ae04e 100644 --- a/gtk/gtkstyleproperties.c +++ b/gtk/gtkstyleproperties.c @@ -34,6 +34,7 @@ #include "gtkborder.h" #include "gtkgradient.h" #include "gtk9slice.h" +#include "gtkshadowprivate.h" #include "gtkintl.h" /** @@ -109,12 +110,6 @@ gtk_style_properties_class_init (GtkStylePropertiesClass *klass) gtk_style_param_set_inherit (pspec, TRUE); gtk_style_properties_register_property (NULL, pspec); - gtk_style_properties_register_property (NULL, - g_param_spec_boxed ("background-color", - "Background color", - "Background color", - GDK_TYPE_RGBA, 0)); - pspec = g_param_spec_boxed ("font", "Font Description", "Font Description", @@ -122,6 +117,13 @@ gtk_style_properties_class_init (GtkStylePropertiesClass *klass) gtk_style_param_set_inherit (pspec, TRUE); gtk_style_properties_register_property (NULL, pspec); + pspec = g_param_spec_boxed ("text-shadow", + "Text shadow", + "Text shadow", + GTK_TYPE_SHADOW, 0); + gtk_style_param_set_inherit (pspec, TRUE); + gtk_style_properties_register_property (NULL, pspec); + gtk_style_properties_register_property (NULL, g_param_spec_boxed ("margin", "Margin", @@ -153,6 +155,11 @@ gtk_style_properties_class_init (GtkStylePropertiesClass *klass) "Border color", "Border color", GDK_TYPE_RGBA, 0)); + gtk_style_properties_register_property (NULL, + g_param_spec_boxed ("background-color", + "Background color", + "Background color", + GDK_TYPE_RGBA, 0)); gtk_style_properties_register_property (NULL, g_param_spec_boxed ("background-image", "Background Image",