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
This commit is contained in:
Dan Winship 2011-09-07 12:23:43 -04:00
parent f65826b3ba
commit f2f2898fe3
2 changed files with 7 additions and 13 deletions

View File

@ -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;
}

View File

@ -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';
}
},