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:
@ -23,7 +23,8 @@ function SearchEntry(focusBase) {
|
||||
SearchEntry.prototype = {
|
||||
_init : function(focusBase) {
|
||||
this.actor = new St.Entry({ name: 'searchEntry',
|
||||
hint_text: _("Search your computer") });
|
||||
hint_text: _("Search your computer"),
|
||||
track_hover: true });
|
||||
this.entry = this.actor.clutter_text;
|
||||
|
||||
this.actor.clutter_text.connect('text-changed', Lang.bind(this,
|
||||
@ -73,13 +74,7 @@ SearchEntry.prototype = {
|
||||
},
|
||||
|
||||
reset: function () {
|
||||
let [x, y, mask] = global.get_pointer();
|
||||
let actor = global.stage.get_actor_at_pos (Clutter.PickMode.REACTIVE,
|
||||
x, y);
|
||||
// this.actor is never hovered directly, only its clutter_text and icon
|
||||
let hovered = this.actor == actor.get_parent();
|
||||
|
||||
this.actor.set_hover(hovered);
|
||||
this.actor.sync_hover();
|
||||
|
||||
this.entry.text = '';
|
||||
|
||||
|
Reference in New Issue
Block a user