dash: Fix some issues with the label API
Be able to call setLabelText more than once. https://bugzilla.gnome.org/show_bug.cgi?id=682445
This commit is contained in:
parent
88effdd9c3
commit
983535224e
@ -124,15 +124,19 @@ const DashItemContainer = new Lang.Class({
|
|||||||
},
|
},
|
||||||
|
|
||||||
setLabelText: function(text) {
|
setLabelText: function(text) {
|
||||||
if (this.label == null)
|
if (this.label == null) {
|
||||||
this.label = new St.Label({ style_class: 'dash-label'});
|
this.label = new St.Label({ style_class: 'dash-label'});
|
||||||
|
|
||||||
this.label.set_text(text);
|
|
||||||
Main.layoutManager.addChrome(this.label);
|
Main.layoutManager.addChrome(this.label);
|
||||||
this.label.hide();
|
this.label.hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.label.set_text(text);
|
||||||
},
|
},
|
||||||
|
|
||||||
hideLabel: function () {
|
hideLabel: function () {
|
||||||
|
if (this.label == null)
|
||||||
|
return;
|
||||||
|
|
||||||
Tweener.addTween(this.label,
|
Tweener.addTween(this.label,
|
||||||
{ opacity: 0,
|
{ opacity: 0,
|
||||||
time: DASH_ITEM_LABEL_HIDE_TIME,
|
time: DASH_ITEM_LABEL_HIDE_TIME,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user