Commit ea94dab6 authored by Timm Bäder's avatar Timm Bäder 👎

Add & use GTK_CSS_AFFECTS_TRANSFORM

parent 17f6169a
......@@ -1605,7 +1605,7 @@ _gtk_css_style_property_init_properties (void)
GTK_CSS_PROPERTY_TRANSFORM,
G_TYPE_NONE,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_CSS_AFFECTS_SIZE,
GTK_CSS_AFFECTS_TRANSFORM,
transform_value_parse,
NULL,
_gtk_css_transform_value_new_none ());
......
......@@ -115,6 +115,7 @@ typedef guint64 GtkCssChange;
* @GTK_CSS_AFFECTS_POSTEFFECT: An effect is applied after drawing that changes
* @GTK_CSS_AFFECTS_TEXT: Affects anything related to text rendering.
* @GTK_CSS_AFFECTS_REDRAW: Affects anything that requires redraw.
* @GTK_CSS_AFFECTS_TRANSFORM: Affects the element transformation.
*
* The generic effects that a CSS property can have. If a value is
* set, then the property will have an influence on that feature.
......@@ -133,7 +134,8 @@ typedef enum {
GTK_CSS_AFFECTS_SYMBOLIC_ICON = (1 << 8),
GTK_CSS_AFFECTS_OUTLINE = (1 << 9),
GTK_CSS_AFFECTS_SIZE = (1 << 10),
GTK_CSS_AFFECTS_POSTEFFECT = (1 << 11)
GTK_CSS_AFFECTS_POSTEFFECT = (1 << 11),
GTK_CSS_AFFECTS_TRANSFORM = (1 << 12),
} GtkCssAffects;
#define GTK_CSS_AFFECTS_REDRAW (GTK_CSS_AFFECTS_CONTENT | \
......
......@@ -5531,6 +5531,11 @@ gtk_widget_real_style_updated (GtkWidget *widget)
{
gtk_widget_queue_resize (widget);
}
else if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TRANSFORM) &&
priv->parent != NULL)
{
gtk_widget_queue_allocate (priv->parent);
}
else if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_REDRAW) ||
(has_text && gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT_CONTENT)))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment