Pick up change from gradient to solid background

On style changes from gradient to solid backgrounds, the new background
must be drawn unconditionally, not depending on whether old and new
background color differ.

https://bugzilla.gnome.org/show_bug.cgi?id=608914
This commit is contained in:
Florian Müllner 2010-02-03 17:38:18 +01:00
parent 86515f3943
commit 2b15f38730

View File

@ -778,12 +778,11 @@ st_widget_real_style_changed (StWidget *self)
if (gradient == ST_GRADIENT_NONE) if (gradient == ST_GRADIENT_NONE)
{ {
if (gradient != priv->bg_gradient_type)
has_changed = TRUE;
priv->bg_gradient_type = gradient;
st_theme_node_get_background_color (theme_node, &color); st_theme_node_get_background_color (theme_node, &color);
if (!clutter_color_equal (&color, &priv->bg_color)) if (gradient != priv->bg_gradient_type ||
!clutter_color_equal (&color, &priv->bg_color))
{ {
priv->bg_gradient_type = gradient;
priv->bg_color = color; priv->bg_color = color;
priv->draw_bg_color = color.alpha != 0; priv->draw_bg_color = color.alpha != 0;
has_changed = TRUE; has_changed = TRUE;