mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 21:40:19 +00:00
GtkButton: Remove unneeded gtk_style_context_notify_state_change() calls
There is now code to handle this for one-item widgets (such as GtkButton) in gtk_widget_set_state_flags()
This commit is contained in:
parent
2f0b5d8a9d
commit
9c0ef02ea5
@ -1762,18 +1762,6 @@ gtk_button_enter_notify (GtkWidget *widget,
|
||||
{
|
||||
priv->in_button = TRUE;
|
||||
gtk_button_enter (button);
|
||||
|
||||
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_PRELIGHT,
|
||||
button->in_button);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@ -1792,18 +1780,6 @@ gtk_button_leave_notify (GtkWidget *widget,
|
||||
{
|
||||
priv->in_button = FALSE;
|
||||
gtk_button_leave (button);
|
||||
|
||||
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_PRELIGHT,
|
||||
button->in_button);
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@ -2292,18 +2268,6 @@ _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