Ensure theme styles are computed when applying transparency

This commit is contained in:
Charles Gagnon
2019-05-07 13:24:52 -04:00
parent 8a775e4c84
commit e6b0b2a866
3 changed files with 15 additions and 3 deletions

View File

@@ -144,6 +144,7 @@ var DynamicTransparency = Utils.defineClass({
this._updateColor(themeBackground);
this._updateAlpha(themeBackground);
this._updateComplementaryStyles();
this._updateGradient();
this._setBackground();
this._setGradient();
@@ -164,6 +165,12 @@ var DynamicTransparency = Utils.defineClass({
this._setGradient();
},
_updateComplementaryStyles: function() {
let panelThemeNode = this._dtpPanel.panel.actor.get_theme_node();
this._complementaryStyles = 'border-radius: ' + panelThemeNode.get_border_radius(0) + 'px;';
},
_updateColor: function(themeBackground) {
this._backgroundColor = this._dtpSettings.get_boolean('trans-use-custom-bg') ?
this._dtpSettings.get_string('trans-bg-color') :
@@ -198,7 +205,7 @@ var DynamicTransparency = Utils.defineClass({
let transition = 'transition-duration:' + this._animationDuration;
let cornerStyle = '-panel-corner-background-color: ' + this.currentBackgroundColor + transition;
this._dtpPanel.panelBg.set_style('background-color: ' + this.currentBackgroundColor + transition + this._dtpPanel.panelBg.styles);
this._dtpPanel.panelBg.set_style('background-color: ' + this.currentBackgroundColor + transition + this._complementaryStyles);
this._dtpPanel.panel._leftCorner.actor.set_style(cornerStyle);
this._dtpPanel.panel._rightCorner.actor.set_style(cornerStyle);
},