diff options
author | Benjamin Otte <otte@redhat.com> | 2016-12-10 03:26:24 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2016-12-10 04:32:55 +0100 |
commit | d7148a47182e0b0ca286243101d3774c6b3d4be5 (patch) | |
tree | 12edf50d4ed91fb931bdf1ebe5e9d583b3e0bc31 /gtk/gtkcssstylepropertyimpl.c | |
parent | 438ad208e7734e66bee56201f1d82a913907839a (diff) | |
download | gtk+-d7148a47182e0b0ca286243101d3774c6b3d4be5.tar.gz |
css: Add "border-spacing" CSS property
It's using a GtkCssPositionValue, even though that name is wrong. But
the functionality of managing 2 lengths is exactly what we want.
Nobody is using this yet.
Diffstat (limited to 'gtk/gtkcssstylepropertyimpl.c')
-rw-r--r-- | gtk/gtkcssstylepropertyimpl.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c index 3571d68dfd..d781d51251 100644 --- a/gtk/gtkcssstylepropertyimpl.c +++ b/gtk/gtkcssstylepropertyimpl.c @@ -563,6 +563,13 @@ transform_value_parse (GtkCssStyleProperty *property, } static GtkCssValue * +border_spacing_value_parse (GtkCssStyleProperty *property, + GtkCssParser *parser) +{ + return gtk_css_position_value_parse_spacing (parser); +} + +static GtkCssValue * border_corner_radius_value_parse (GtkCssStyleProperty *property, GtkCssParser *parser) { @@ -1448,6 +1455,16 @@ _gtk_css_style_property_init_properties (void) NULL, _gtk_css_transform_value_new_none ()); + gtk_css_style_property_register ("border-spacing", + GTK_CSS_PROPERTY_BORDER_SPACING, + G_TYPE_NONE, + GTK_STYLE_PROPERTY_ANIMATED, + GTK_CSS_AFFECTS_SIZE, + border_spacing_value_parse, + NULL, + _gtk_css_position_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 ("min-width", GTK_CSS_PROPERTY_MIN_WIDTH, G_TYPE_INT, |