mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-07 11:20:09 +00:00
GtkButton: Notify on active state when (un)depressed
This commit is contained in:
parent
9b949479b3
commit
91904f6778
@ -2246,6 +2246,18 @@ _gtk_button_set_depressed (GtkButton *button,
|
||||
|
||||
if (depressed != priv->depressed)
|
||||
{
|
||||
if (gtk_widget_get_realized (widget) &&
|
||||
gtk_widget_is_drawable (widget))
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
gtk_style_context_notify_state_change (context,
|
||||
gtk_widget_get_window (widget),
|
||||
NULL, GTK_STATE_ACTIVE,
|
||||
depressed);
|
||||
}
|
||||
|
||||
priv->depressed = depressed;
|
||||
gtk_widget_queue_resize (widget);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user