[gtk+] range: Implement :hover for the whole widget



commit 4c33645a7aeb98cde0140202a1a2a18a0f25564a
Author: Benjamin Otte <otte redhat com>
Date:   Sat Nov 29 03:33:47 2014 +0100

    range: Implement :hover for the whole widget

 gtk/gtkrange.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c
index bfad44c..404dc3a 100644
--- a/gtk/gtkrange.c
+++ b/gtk/gtkrange.c
@@ -3280,6 +3280,11 @@ gtk_range_update_mouse_location (GtkRange *range)
     {
       gtk_range_queue_draw_location (range, old);
       gtk_range_queue_draw_location (range, priv->mouse_location);
+
+      if (priv->mouse_location == MOUSE_OUTSIDE)
+        gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_PRELIGHT);
+      else
+        gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_PRELIGHT, FALSE);
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]