PopupSwitchMenuItem: don't misuse this.active
The constructor was setting this.active to reflect the switch state, which is wrong; this.active indicates whether or not the item is highlighted. https://bugzilla.gnome.org/show_bug.cgi?id=621671
This commit is contained in:
parent
9ae1238038
commit
e5dd86276d
@ -508,9 +508,8 @@ PopupSwitchMenuItem.prototype = {
|
||||
_init: function(text, active) {
|
||||
PopupBaseMenuItem.prototype._init.call(this);
|
||||
|
||||
this.active = !!active;
|
||||
this.label = new St.Label({ text: text });
|
||||
this._switch = new Switch(this.active);
|
||||
this._switch = new Switch(active);
|
||||
|
||||
this.addActor(this.label);
|
||||
this.addActor(this._switch.actor);
|
||||
|
Loading…
Reference in New Issue
Block a user