[gtk+/parser] styleproperties: Mark "color" and "font" as inherit
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/parser] styleproperties: Mark "color" and "font" as inherit
- Date: Mon, 16 May 2011 21:53:42 +0000 (UTC)
commit 7b94c109eec92a4cb7bd6fafe78b7c86192b9902
Author: Benjamin Otte <otte redhat com>
Date: Mon May 16 19:42:27 2011 +0200
styleproperties: Mark "color" and "font" as inherit
Keeping it identical to CSS 2.1 again
gtk/gtkstyleproperties.c | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkstyleproperties.c b/gtk/gtkstyleproperties.c
index 28c2d9a..dc615d2 100644
--- a/gtk/gtkstyleproperties.c
+++ b/gtk/gtkstyleproperties.c
@@ -98,26 +98,30 @@ static void
gtk_style_properties_class_init (GtkStylePropertiesClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
+ GParamSpec *pspec;
object_class->finalize = gtk_style_properties_finalize;
/* Initialize default property set */
- gtk_style_properties_register_property (NULL,
- g_param_spec_boxed ("color",
- "Foreground color",
- "Foreground color",
- GDK_TYPE_RGBA, 0));
+ pspec = g_param_spec_boxed ("color",
+ "Foreground color",
+ "Foreground color",
+ GDK_TYPE_RGBA, 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 ("background-color",
"Background color",
"Background color",
GDK_TYPE_RGBA, 0));
- gtk_style_properties_register_property (NULL,
- g_param_spec_boxed ("font",
- "Font Description",
- "Font Description",
- PANGO_TYPE_FONT_DESCRIPTION, 0));
+ pspec = g_param_spec_boxed ("font",
+ "Font Description",
+ "Font Description",
+ PANGO_TYPE_FONT_DESCRIPTION, 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",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]