StEntry: remove special redundant hover tracking

For historical reasons, StEntry always did hover tracking when you had
visible hint_text, even if track_hover was FALSE. Remove that special
case, and make entries track hover just like all other widgets do.

If we actually needed to distinguish hovered-with-hint-text from
hovered-without-hint-text (which, at the moment, we don't), we could
do that by setting separate CSS for :hover and :hover:indeterminate.

https://bugzilla.gnome.org/show_bug.cgi?id=642483
This commit is contained in:
Dan Winship
2011-02-16 12:02:14 -05:00
parent 1bc1a0dbf0
commit 1a639f0b17
2 changed files with 3 additions and 35 deletions

View File

@ -599,31 +599,6 @@ st_entry_key_focus_in (ClutterActor *actor)
clutter_actor_grab_key_focus (priv->entry);
}
static gboolean
st_entry_enter_event (ClutterActor *actor,
ClutterCrossingEvent *event)
{
StEntryPrivate *priv = ST_ENTRY_PRIV (actor);
if (clutter_actor_contains (actor, event->source)
&& priv->hint && priv->hint_visible)
{
st_widget_set_hover (ST_WIDGET (actor), TRUE);
}
return CLUTTER_ACTOR_CLASS (st_entry_parent_class)->enter_event (actor, event);
}
static gboolean
st_entry_leave_event (ClutterActor *actor,
ClutterCrossingEvent *event)
{
if (!clutter_actor_contains (actor, event->related))
st_widget_set_hover (ST_WIDGET (actor), FALSE);
return CLUTTER_ACTOR_CLASS (st_entry_parent_class)->leave_event (actor, event);
}
static void
st_entry_class_init (StEntryClass *klass)
{
@ -649,8 +624,6 @@ st_entry_class_init (StEntryClass *klass)
actor_class->key_press_event = st_entry_key_press_event;
actor_class->key_focus_in = st_entry_key_focus_in;
actor_class->enter_event = st_entry_enter_event;
actor_class->leave_event = st_entry_leave_event;
widget_class->style_changed = st_entry_style_changed;
widget_class->navigate_focus = st_entry_navigate_focus;