GNOME Bugzilla – Bug 705634
add a style class for the clock label
Last modified: 2013-08-08 18:32:15 UTC
it's useful if we need to tweak only the clock's label css.
Created attachment 251098 [details] [review] proposed patch
Review of attachment 251098 [details] [review]: probably okay ::: js/ui/dateMenu.js @@ +52,3 @@ this._clockDisplay = new St.Label(); this.actor.add_actor(this._clockDisplay); + this.actor.add_style_class_name ('clock-display'); it's unusual in the shell code to use add_style_class_name unless you're going to remove_style_class_name later. A more typical idiom for this type of thing would be: this.actor.style_class = 'clock-display';
(okay to push with that change)
that's the trick... We don't want to set one class for this item. We want to add another class for it, so that other styles in the panel, or in the container be still applied. notice that I'm not adding a class in the "this._clockDisplay" object. I'm adding it to "this.actor". example: all panel buttons on mouse over I want white: .panel-button:hover { color: white; } and want the clock red, but still inherit mouse over of its parent: .clock-display { color: red; } this works in my patch. if I do as you suggest, it doesn't work...
Comment on attachment 251098 [details] [review] proposed patch fair enough
thanks, pushed to master.