summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Boles <dboles.src@gmail.com>2018-04-21 08:42:43 +0100
committerDaniel Boles <dboles.src@gmail.com>2018-04-21 08:44:09 +0100
commitdbcaa733bb6e95a69c98b57e6bb9164f547da00f (patch)
treea6d447afe6599230c9c6b981730dba00b692501a
parent738b7fe1d0c39b5bc986b202bb201341f71bcfa7 (diff)
downloadgtk+-wip/dboles/entry-hover.tar.gz
SpinButton: Update :hover on widget from gadgetswip/dboles/entry-hover
Just as we treat hovering either icon in the parent Entry as needing to set PRELIGHT on the whole widget, do the same for the up/down buttons. https://gitlab.gnome.org/GNOME/gtk/issues/196 https://gitlab.gnome.org/GNOME/gtk/merge_requests/122#note_99084
-rw-r--r--gtk/gtkspinbutton.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 5a09ba8f36..d6edbcb1d3 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -1264,7 +1264,7 @@ gtk_spin_button_enter_notify (GtkWidget *widget,
{
priv->in_child = event->window;
update_node_state (spin);
- gtk_widget_queue_draw (GTK_WIDGET (spin));
+ gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_PRELIGHT, FALSE);
}
return GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->enter_notify_event (widget, event);
@@ -1281,7 +1281,7 @@ gtk_spin_button_leave_notify (GtkWidget *widget,
{
priv->in_child = NULL;
update_node_state (spin);
- gtk_widget_queue_draw (GTK_WIDGET (spin));
+ gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_PRELIGHT);
}
return GTK_WIDGET_CLASS (gtk_spin_button_parent_class)->leave_notify_event (widget, event);