[gnome-shell] dash: Only set the label's text when initially showing the label
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] dash: Only set the label's text when initially showing the label
- Date: Sun, 7 Oct 2012 16:21:45 +0000 (UTC)
commit 6487cd8c6f415d4050efcd0228875fca4f090c34
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Oct 3 02:22:46 2012 -0300
dash: Only set the label's text when initially showing the label
Having the tooltip change when it's visible looks strange and glitchy.
This also makes sure that "Remove from Favorites" doesn't change, even
when the user removes their mouse cursor from it.
https://bugzilla.gnome.org/show_bug.cgi?id=685313
js/ui/dash.js | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index 215bd6f..dc08b68 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -48,6 +48,7 @@ const DashItemContainer = new Lang.Class({
Lang.bind(this, this._allocate));
this.actor._delegate = this;
+ this._labelText = "";
this.label = new St.Label({ style_class: 'dash-label'});
this.label.hide();
Main.layoutManager.addChrome(this.label);
@@ -106,6 +107,10 @@ const DashItemContainer = new Lang.Class({
},
showLabel: function() {
+ if (!this._labelText)
+ return;
+
+ this.label.set_text(this._labelText);
this.label.opacity = 0;
this.label.show();
@@ -136,7 +141,7 @@ const DashItemContainer = new Lang.Class({
},
setLabelText: function(text) {
- this.label.set_text(text);
+ this._labelText = text;
},
hideLabel: function () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]