Remove ShellButtonBox, button.js; Use St.Clickable in panel.js

StClickable replaces ShellButtonBox.  Reduce the number of
button-like things by deleting button.js.

To do so, add CSS style for the actitivies button.

https://bugzilla.gnome.org/show_bug.cgi?id=602131
This commit is contained in:
Colin Walters
2009-11-16 14:16:22 -05:00
parent 93f3412f70
commit 2f1ca7bf28
9 changed files with 28 additions and 544 deletions

View File

@ -440,16 +440,18 @@ SwitcherList.prototype = {
addItem : function(item) {
// We want the St.Bin's padding to be clickable (since it will
// be part of the highlighted background color), so we put the
// bin inside the ButtonBox rather than vice versa.
// bin inside the Clickable rather than vice versa.
let bin = new St.Bin({ style_class: 'item-box' });
let bbox = new Shell.ButtonBox({ reactive: true });
let bbox = new St.Clickable({ reactive: true,
x_fill: true,
y_fill: true });
bin.add_actor(item);
bbox.append(bin, Big.BoxPackFlags.NONE);
bbox.set_child(bin);
this._list.add_actor(bbox);
let n = this._items.length;
bbox.connect('activate', Lang.bind(this, function () {
bbox.connect('clicked', Lang.bind(this, function () {
this._itemActivated(n);
}));
bbox.connect('enter-event', Lang.bind(this, function () {
@ -681,7 +683,7 @@ AppSwitcher.prototype = {
this.icons.push(appIcon);
this.addItem(appIcon.actor);
// SwitcherList creates its own Shell.ButtonBox; we want to
// SwitcherList creates its own St.Clickable; we want to
// avoid intercepting the events it wants.
appIcon.actor.reactive = false;