GtkStackSwitcher: Simplify setting of .needs-attention
Always add the .needs-attention style class, even if the button is active. Themes can already avoid showing anything in this case.
This commit is contained in:
parent
e084e5c67e
commit
bb6057bfb7
@ -156,7 +156,7 @@ update_needs_attention (GtkWidget *widget, GtkWidget *button, gpointer data)
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
context = gtk_widget_get_style_context (button);
|
context = gtk_widget_get_style_context (button);
|
||||||
if (needs_attention && !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))
|
if (needs_attention)
|
||||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_NEEDS_ATTENTION);
|
gtk_style_context_add_class (context, GTK_STYLE_CLASS_NEEDS_ATTENTION);
|
||||||
else
|
else
|
||||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_NEEDS_ATTENTION);
|
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_NEEDS_ATTENTION);
|
||||||
|
Loading…
Reference in New Issue
Block a user