Refactor show()/hide() sequences
We seem to have a lot of code that does something along the lines of: if (condition) actor.show(); else actor.hide(); ClutterActor already has such a thing for exactly this purpose: the 'visible' property. Use it instead of the mess above. https://bugzilla.gnome.org/show_bug.cgi?id=672272
This commit is contained in:
@ -149,13 +149,9 @@ const Indicator = new Lang.Class({
|
||||
}
|
||||
}
|
||||
}
|
||||
if (showInput) {
|
||||
this._inputTitle.actor.show();
|
||||
this._inputSlider.actor.show();
|
||||
} else {
|
||||
this._inputTitle.actor.hide();
|
||||
this._inputSlider.actor.hide();
|
||||
}
|
||||
|
||||
this._inputTitle.actor.visible = showInput;
|
||||
this._inputSlider.actor.visible = showInput;
|
||||
},
|
||||
|
||||
_volumeToIcon: function(volume) {
|
||||
|
Reference in New Issue
Block a user