mirror of
https://github.com/oleid/gnome-shell-teatime.git
synced 2022-04-29 18:53:50 +00:00
read and use padding from current theme
This commit is contained in:
parent
9c600f4de4
commit
fa2c7007fa
@ -348,6 +348,8 @@ const TeaTime = new Lang.Class({
|
||||
_onStyleChanged: function(actor) {
|
||||
let themeNode = actor.get_theme_node();
|
||||
let color = themeNode.get_foreground_color()
|
||||
let [bHasPadding, padding] = themeNode.lookup_length("-natural-hpadding", false);
|
||||
|
||||
this._primaryColor = color;
|
||||
this._secondaryColor = new Clutter.Color({
|
||||
red: color.red,
|
||||
@ -355,6 +357,8 @@ const TeaTime = new Lang.Class({
|
||||
blue: color.blue,
|
||||
alpha: color.alpha*0.3
|
||||
});
|
||||
this._logo.setPadding(bHasPadding*padding);
|
||||
this._graphicalTimer.setPadding(bHasPadding*padding);
|
||||
this._logo.setColor(this._primaryColor, this._secondaryColor);
|
||||
this._graphicalTimer.setColor(this._primaryColor, this._secondaryColor);
|
||||
}
|
||||
|
@ -39,6 +39,10 @@ const TwoColorIcon = new Lang.Class({
|
||||
this._secundaryColor = this._primaryColor;
|
||||
this._currentStatus = null;
|
||||
},
|
||||
setPadding: function(padding) {
|
||||
this.margin_left = padding;
|
||||
this.margin_right = padding;
|
||||
},
|
||||
setColor: function(primary, secundary) {
|
||||
this._primaryColor = primary;
|
||||
this._secundaryColor = secundary;
|
||||
|
Loading…
Reference in New Issue
Block a user