Revert "css: Simplify default values"

This reverts commit 1efa39672b.

We want to use corner values for corner properties.
This commit is contained in:
Matthias Clasen 2023-05-12 14:09:36 -04:00
parent b18320fe05
commit 54ff5d8edd
2 changed files with 9 additions and 6 deletions

View File

@ -64,7 +64,7 @@ gtk_css_value_initial_compute (GtkCssValue *value,
case GTK_CSS_PROPERTY_FONT_FAMILY: case GTK_CSS_PROPERTY_FONT_FAMILY:
settings = gtk_style_provider_get_settings (provider); settings = gtk_style_provider_get_settings (provider);
if (settings && gtk_settings_get_font_family (settings) != NULL) if (settings && gtk_settings_get_font_family (settings) != NULL)
return _gtk_css_string_value_new (gtk_settings_get_font_family (settings)); return _gtk_css_array_value_new (_gtk_css_string_value_new (gtk_settings_get_font_family (settings)));
break; break;
default: default:

View File

@ -1095,25 +1095,29 @@ _gtk_css_style_property_init_properties (void)
GTK_STYLE_PROPERTY_ANIMATED, GTK_STYLE_PROPERTY_ANIMATED,
GTK_CSS_AFFECTS_BACKGROUND | GTK_CSS_AFFECTS_BORDER, GTK_CSS_AFFECTS_BACKGROUND | GTK_CSS_AFFECTS_BORDER,
border_corner_radius_value_parse, border_corner_radius_value_parse,
_gtk_css_number_value_new (0, GTK_CSS_PX)); _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 ("border-top-right-radius", gtk_css_style_property_register ("border-top-right-radius",
GTK_CSS_PROPERTY_BORDER_TOP_RIGHT_RADIUS, GTK_CSS_PROPERTY_BORDER_TOP_RIGHT_RADIUS,
GTK_STYLE_PROPERTY_ANIMATED, GTK_STYLE_PROPERTY_ANIMATED,
GTK_CSS_AFFECTS_BACKGROUND | GTK_CSS_AFFECTS_BORDER, GTK_CSS_AFFECTS_BACKGROUND | GTK_CSS_AFFECTS_BORDER,
border_corner_radius_value_parse, border_corner_radius_value_parse,
_gtk_css_number_value_new (0, GTK_CSS_PX)); _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 ("border-bottom-right-radius", gtk_css_style_property_register ("border-bottom-right-radius",
GTK_CSS_PROPERTY_BORDER_BOTTOM_RIGHT_RADIUS, GTK_CSS_PROPERTY_BORDER_BOTTOM_RIGHT_RADIUS,
GTK_STYLE_PROPERTY_ANIMATED, GTK_STYLE_PROPERTY_ANIMATED,
GTK_CSS_AFFECTS_BACKGROUND | GTK_CSS_AFFECTS_BORDER, GTK_CSS_AFFECTS_BACKGROUND | GTK_CSS_AFFECTS_BORDER,
border_corner_radius_value_parse, border_corner_radius_value_parse,
_gtk_css_number_value_new (0, GTK_CSS_PX)); _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 ("border-bottom-left-radius", gtk_css_style_property_register ("border-bottom-left-radius",
GTK_CSS_PROPERTY_BORDER_BOTTOM_LEFT_RADIUS, GTK_CSS_PROPERTY_BORDER_BOTTOM_LEFT_RADIUS,
GTK_STYLE_PROPERTY_ANIMATED, GTK_STYLE_PROPERTY_ANIMATED,
GTK_CSS_AFFECTS_BACKGROUND | GTK_CSS_AFFECTS_BORDER, GTK_CSS_AFFECTS_BACKGROUND | GTK_CSS_AFFECTS_BORDER,
border_corner_radius_value_parse, border_corner_radius_value_parse,
_gtk_css_number_value_new (0, GTK_CSS_PX)); _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-style", gtk_css_style_property_register ("outline-style",
GTK_CSS_PROPERTY_OUTLINE_STYLE, GTK_CSS_PROPERTY_OUTLINE_STYLE,
@ -1133,7 +1137,6 @@ _gtk_css_style_property_init_properties (void)
GTK_CSS_AFFECTS_OUTLINE, GTK_CSS_AFFECTS_OUTLINE,
outline_parse, outline_parse,
_gtk_css_number_value_new (0.0, GTK_CSS_PX)); _gtk_css_number_value_new (0.0, GTK_CSS_PX));
gtk_css_style_property_register ("background-clip", gtk_css_style_property_register ("background-clip",
GTK_CSS_PROPERTY_BACKGROUND_CLIP, GTK_CSS_PROPERTY_BACKGROUND_CLIP,
0, 0,