[gtk+] Prefix outline radius CSS properties



commit f61b7ba7970870704529627a5127c9d5a7484eeb
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Dec 22 16:18:10 2015 -0500

    Prefix outline radius CSS properties
    
    These are not in any CSS specifications, so mark them as GTK+
    additions by giving them a -gtk prefix. The old names still work.

 gtk/gtkcssshorthandpropertyimpl.c |    3 ++-
 gtk/gtkcssstylepropertyimpl.c     |   12 ++++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkcssshorthandpropertyimpl.c b/gtk/gtkcssshorthandpropertyimpl.c
index 7598048..2d1ac25 100644
--- a/gtk/gtkcssshorthandpropertyimpl.c
+++ b/gtk/gtkcssshorthandpropertyimpl.c
@@ -1290,12 +1290,13 @@ _gtk_css_shorthand_property_init_properties (void)
                                           parse_border,
                                           NULL,
                                           NULL);
-  _gtk_css_shorthand_property_register   ("outline-radius",
+  _gtk_css_shorthand_property_register   ("-gtk-outline-radius",
                                           G_TYPE_INT,
                                           outline_radius_subproperties,
                                           parse_border_radius,
                                           unpack_border_radius,
                                           pack_border_radius);
+  _gtk_style_property_add_alias ("-gtk-outline-radius", "outline-radius");
   _gtk_css_shorthand_property_register   ("outline",
                                           G_TYPE_NONE,
                                           outline_subproperties,
diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c
index 12d56fb..bd7f664 100644
--- a/gtk/gtkcssstylepropertyimpl.c
+++ b/gtk/gtkcssstylepropertyimpl.c
@@ -1386,7 +1386,7 @@ _gtk_css_style_property_init_properties (void)
                                           assign_length_from_int,
                                           _gtk_css_number_value_new (0.0, GTK_CSS_PX));
 
-  gtk_css_style_property_register        ("outline-top-left-radius",
+  gtk_css_style_property_register        ("-gtk-outline-top-left-radius",
                                           GTK_CSS_PROPERTY_OUTLINE_TOP_LEFT_RADIUS,
                                           G_TYPE_NONE,
                                           GTK_STYLE_PROPERTY_ANIMATED,
@@ -1396,7 +1396,8 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_corner_value_new (_gtk_css_number_value_new (0, 
GTK_CSS_PX),
                                                                      _gtk_css_number_value_new (0, 
GTK_CSS_PX)));
-  gtk_css_style_property_register        ("outline-top-right-radius",
+  _gtk_style_property_add_alias ("-gtk-outline-top-left-radius", "outline-top-left-radius");
+  gtk_css_style_property_register        ("-gtk-outline-top-right-radius",
                                           GTK_CSS_PROPERTY_OUTLINE_TOP_RIGHT_RADIUS,
                                           G_TYPE_NONE,
                                           GTK_STYLE_PROPERTY_ANIMATED,
@@ -1406,7 +1407,8 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_corner_value_new (_gtk_css_number_value_new (0, 
GTK_CSS_PX),
                                                                      _gtk_css_number_value_new (0, 
GTK_CSS_PX)));
-  gtk_css_style_property_register        ("outline-bottom-right-radius",
+  _gtk_style_property_add_alias ("-gtk-outline-top-right-radius", "outline-top-right-radius");
+  gtk_css_style_property_register        ("-gtk-outline-bottom-right-radius",
                                           GTK_CSS_PROPERTY_OUTLINE_BOTTOM_RIGHT_RADIUS,
                                           G_TYPE_NONE,
                                           GTK_STYLE_PROPERTY_ANIMATED,
@@ -1416,7 +1418,8 @@ _gtk_css_style_property_init_properties (void)
                                           NULL,
                                           _gtk_css_corner_value_new (_gtk_css_number_value_new (0, 
GTK_CSS_PX),
                                                                      _gtk_css_number_value_new (0, 
GTK_CSS_PX)));
-  gtk_css_style_property_register        ("outline-bottom-left-radius",
+  _gtk_style_property_add_alias ("-gtk-outline-bottom-right-radius", "outline-bottom-right-radius");
+  gtk_css_style_property_register        ("-gtk-outline-bottom-left-radius",
                                           GTK_CSS_PROPERTY_OUTLINE_BOTTOM_LEFT_RADIUS,
                                           G_TYPE_NONE,
                                           GTK_STYLE_PROPERTY_ANIMATED,
@@ -1427,6 +1430,7 @@ _gtk_css_style_property_init_properties (void)
                                           _gtk_css_corner_value_new (_gtk_css_number_value_new (0, 
GTK_CSS_PX),
                                                                      _gtk_css_number_value_new (0, 
GTK_CSS_PX)));
 
+  _gtk_style_property_add_alias ("-gtk-outline-bottom-left-radius", "outline-bottom-left-radius");
   gtk_css_style_property_register        ("background-clip",
                                           GTK_CSS_PROPERTY_BACKGROUND_CLIP,
                                           G_TYPE_NONE,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]