forked from AuroraMiddleware/gtk
css: add properties for outline-radius
Both a shorthand and individual properties. This is not officially part of the CSS standard, but there's precedence for it at least in Mozilla: https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius
This commit is contained in:
parent
a60ba815d9
commit
e8cbbedbb2
@ -277,6 +277,10 @@ gtk_css_value_array_transition (GtkCssValue *start,
|
||||
case GTK_CSS_PROPERTY_OUTLINE_STYLE:
|
||||
case GTK_CSS_PROPERTY_OUTLINE_WIDTH:
|
||||
case GTK_CSS_PROPERTY_OUTLINE_OFFSET:
|
||||
case GTK_CSS_PROPERTY_OUTLINE_TOP_LEFT_RADIUS:
|
||||
case GTK_CSS_PROPERTY_OUTLINE_TOP_RIGHT_RADIUS:
|
||||
case GTK_CSS_PROPERTY_OUTLINE_BOTTOM_RIGHT_RADIUS:
|
||||
case GTK_CSS_PROPERTY_OUTLINE_BOTTOM_LEFT_RADIUS:
|
||||
case GTK_CSS_PROPERTY_BORDER_TOP_COLOR:
|
||||
case GTK_CSS_PROPERTY_BORDER_RIGHT_COLOR:
|
||||
case GTK_CSS_PROPERTY_BORDER_BOTTOM_COLOR:
|
||||
|
@ -1111,6 +1111,8 @@ _gtk_css_shorthand_property_init_properties (void)
|
||||
"border-top-color", "border-right-color", "border-bottom-color", "border-left-color",
|
||||
"border-image-source", "border-image-slice", "border-image-width", "border-image-repeat", NULL };
|
||||
const char *outline_subproperties[] = { "outline-width", "outline-style", "outline-color", NULL };
|
||||
const char *outline_radius_subproperties[] = { "outline-top-left-radius", "outline-top-right-radius",
|
||||
"outline-bottom-right-radius", "outline-bottom-left-radius", NULL };
|
||||
const char *background_subproperties[] = { "background-image", "background-position", "background-size", "background-repeat", "background-clip", "background-origin",
|
||||
"background-color", NULL };
|
||||
const char *transition_subproperties[] = { "transition-property", "transition-duration", "transition-delay", "transition-timing-function", NULL };
|
||||
@ -1195,6 +1197,12 @@ _gtk_css_shorthand_property_init_properties (void)
|
||||
parse_border,
|
||||
NULL,
|
||||
NULL);
|
||||
_gtk_css_shorthand_property_register ("outline-radius",
|
||||
G_TYPE_INT,
|
||||
outline_radius_subproperties,
|
||||
parse_border_radius,
|
||||
unpack_border_radius,
|
||||
pack_border_radius);
|
||||
_gtk_css_shorthand_property_register ("outline",
|
||||
G_TYPE_NONE,
|
||||
outline_subproperties,
|
||||
|
@ -1169,6 +1169,43 @@ _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_PROPERTY_OUTLINE_TOP_LEFT_RADIUS,
|
||||
G_TYPE_NONE,
|
||||
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
|
||||
border_corner_radius_value_parse,
|
||||
NULL,
|
||||
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_CSS_PROPERTY_OUTLINE_TOP_RIGHT_RADIUS,
|
||||
G_TYPE_NONE,
|
||||
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
|
||||
border_corner_radius_value_parse,
|
||||
NULL,
|
||||
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_CSS_PROPERTY_OUTLINE_BOTTOM_RIGHT_RADIUS,
|
||||
G_TYPE_NONE,
|
||||
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
|
||||
border_corner_radius_value_parse,
|
||||
NULL,
|
||||
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_CSS_PROPERTY_OUTLINE_BOTTOM_LEFT_RADIUS,
|
||||
G_TYPE_NONE,
|
||||
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
|
||||
border_corner_radius_value_parse,
|
||||
NULL,
|
||||
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 ("background-clip",
|
||||
GTK_CSS_PROPERTY_BACKGROUND_CLIP,
|
||||
G_TYPE_NONE,
|
||||
|
@ -105,6 +105,10 @@ enum { /*< skip >*/
|
||||
GTK_CSS_PROPERTY_OUTLINE_STYLE,
|
||||
GTK_CSS_PROPERTY_OUTLINE_WIDTH,
|
||||
GTK_CSS_PROPERTY_OUTLINE_OFFSET,
|
||||
GTK_CSS_PROPERTY_OUTLINE_TOP_LEFT_RADIUS,
|
||||
GTK_CSS_PROPERTY_OUTLINE_TOP_RIGHT_RADIUS,
|
||||
GTK_CSS_PROPERTY_OUTLINE_BOTTOM_RIGHT_RADIUS,
|
||||
GTK_CSS_PROPERTY_OUTLINE_BOTTOM_LEFT_RADIUS,
|
||||
GTK_CSS_PROPERTY_BACKGROUND_CLIP,
|
||||
GTK_CSS_PROPERTY_BACKGROUND_ORIGIN,
|
||||
GTK_CSS_PROPERTY_BACKGROUND_SIZE,
|
||||
|
Loading…
Reference in New Issue
Block a user