mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-18 16:10:08 +00:00
Add some static assertions
Add assertions that ensure the relationships between css property IDs that we rely on are preserved.
This commit is contained in:
parent
a350c2452a
commit
a38ba91e35
@ -206,6 +206,12 @@ gtk_css_static_style_new_compute (GtkStyleProvider *provider,
|
|||||||
return GTK_CSS_STYLE (result);
|
return GTK_CSS_STYLE (result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_STATIC_ASSERT (GTK_CSS_PROPERTY_BORDER_TOP_STYLE == GTK_CSS_PROPERTY_BORDER_TOP_WIDTH - 1);
|
||||||
|
G_STATIC_ASSERT (GTK_CSS_PROPERTY_BORDER_RIGHT_STYLE == GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH - 1);
|
||||||
|
G_STATIC_ASSERT (GTK_CSS_PROPERTY_BORDER_BOTTOM_STYLE == GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH - 1);
|
||||||
|
G_STATIC_ASSERT (GTK_CSS_PROPERTY_BORDER_LEFT_STYLE == GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH - 1);
|
||||||
|
G_STATIC_ASSERT (GTK_CSS_PROPERTY_OUTLINE_STYLE == GTK_CSS_PROPERTY_OUTLINE_WIDTH - 1);
|
||||||
|
|
||||||
void
|
void
|
||||||
gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
|
gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
|
||||||
GtkStyleProvider *provider,
|
GtkStyleProvider *provider,
|
||||||
|
@ -921,6 +921,9 @@ icon_theme_value_parse (GtkCssStyleProperty *property,
|
|||||||
|
|
||||||
/*** REGISTRATION ***/
|
/*** REGISTRATION ***/
|
||||||
|
|
||||||
|
G_STATIC_ASSERT (GTK_CSS_PROPERTY_COLOR == 0);
|
||||||
|
G_STATIC_ASSERT (GTK_CSS_PROPERTY_DPI < GTK_CSS_PROPERTY_FONT_SIZE);
|
||||||
|
|
||||||
void
|
void
|
||||||
_gtk_css_style_property_init_properties (void)
|
_gtk_css_style_property_init_properties (void)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user