[gnome-flashback] input-sources: add hover pseudo class to GfCandidateBox
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] input-sources: add hover pseudo class to GfCandidateBox
- Date: Mon, 18 Jan 2016 11:14:17 +0000 (UTC)
commit 28d1a0c3ebfffe2cb65f4a5f9ac71f9e371d7ad1
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Jan 18 12:52:12 2016 +0200
input-sources: add hover pseudo class to GfCandidateBox
.../libinput-sources/gf-candidate-box.c | 21 ++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-candidate-box.c
b/gnome-flashback/libinput-sources/gf-candidate-box.c
index 74fd0e8..8d70867 100644
--- a/gnome-flashback/libinput-sources/gf-candidate-box.c
+++ b/gnome-flashback/libinput-sources/gf-candidate-box.c
@@ -64,6 +64,24 @@ gf_candidate_box_set_property (GObject *object,
}
}
+static gboolean
+gf_candidate_box_enter_notify_event (GtkWidget *widget,
+ GdkEventCrossing *event)
+{
+ gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_PRELIGHT, TRUE);
+
+ return GDK_EVENT_PROPAGATE;
+}
+
+static gboolean
+gf_candidate_box_leave_notify_event (GtkWidget *widget,
+ GdkEventCrossing *event)
+{
+ gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_NORMAL, TRUE);
+
+ return GDK_EVENT_PROPAGATE;
+}
+
static void
gf_candidate_box_class_init (GfCandidateBoxClass *box_class)
{
@@ -75,6 +93,9 @@ gf_candidate_box_class_init (GfCandidateBoxClass *box_class)
object_class->set_property = gf_candidate_box_set_property;
+ widget_class->enter_notify_event = gf_candidate_box_enter_notify_event;
+ widget_class->leave_notify_event = gf_candidate_box_leave_notify_event;
+
properties[PROP_INDEX] =
g_param_spec_uint ("index", "index", "index", 0, G_MAXUINT, 0,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE |
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]