[StWidget] add (optional) hover tracking

If track-hover is set, update the hover property automatically, and
the "hover" pseudo class to match, as StClickable used to do. (Remove
the corresponding code in StClickable). Tweak the tooltip handling to
use track-hover, which also makes it slightly more reliable in the
presence of reactive children, etc.
This commit is contained in:
Dan Winship
2010-03-19 13:47:34 -04:00
parent 909b5ec43c
commit f9e4385e02
5 changed files with 257 additions and 67 deletions

View File

@ -536,6 +536,8 @@ AppWellIcon.prototype = {
},
_onMenuPoppedDown: function() {
this.actor.sync_hover();
if (this._didActivateWindow)
return;
if (!this._setWindowSelection)

View File

@ -484,10 +484,7 @@ NewWorkspaceArea.prototype = {
},
setStyle: function(isHover) {
if (isHover)
this._child1.add_style_pseudo_class('hover');
else
this._child1.remove_style_pseudo_class('hover');
this._child1.set_hover(isHover);
}
};