[gnome-shell] panel: fix part of the panel-corner-highlighting hack
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] panel: fix part of the panel-corner-highlighting hack
- Date: Fri, 16 Sep 2011 18:16:19 +0000 (UTC)
commit f2f2898fe3622dced9a7dd4a5f1592569bf67f23
Author: Dan Winship <danw gnome org>
Date: Wed Sep 7 12:23:43 2011 -0400
panel: fix part of the panel-corner-highlighting hack
The underline highlights on the panel menu items normally have a 100ms
transition between highlighted and unhighlighted, but the panel corner
graphics can't do that, so we hacked the Activities button and user
menu to have no transition. But in gdm mode, the user menu isn't the
rightmost item any more. Fix this by modifying the CSS from the code
instead.
https://bugzilla.gnome.org/show_bug.cgi?id=651299
data/theme/gnome-shell.css | 12 ------------
js/ui/panel.js | 8 +++++++-
2 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 83a6d03..8d3580e 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -371,18 +371,6 @@ StTooltip StLabel {
-boxpointer-gap: 4px
}
-/* The rounded panel corners we draw don't
- * support transitions, so disable transitions
- * for the buttons at the left/right edges
- */
-#panelActivities {
- transition-duration: 0;
-}
-
-#panelStatus {
- transition-duration: 0;
-}
-
#panelStatusMenu {
spacing: 4px;
}
diff --git a/js/ui/panel.js b/js/ui/panel.js
index b64a1b2..57db125 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -782,8 +782,10 @@ PanelCorner.prototype = {
button = this._findRightmostButton(this._box);
if (button) {
- if (this._button && this._buttonStyleChangedSignalId)
+ if (this._button && this._buttonStyleChangedSignalId) {
this._button.disconnect(this._buttonStyleChangedSignalId);
+ this._button.style = null;
+ }
this._button = button;
@@ -801,6 +803,10 @@ PanelCorner.prototype = {
let pseudoClass = button.get_style_pseudo_class();
this.actor.set_style_pseudo_class(pseudoClass);
}));
+
+ // The corner doesn't support theme transitions, so override
+ // the .panel-button default
+ button.style = 'transition-duration: 0';
}
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]