Fix panelcorner actor warning on 3.53.3

This commit is contained in:
Charles Gagnon
2020-01-17 14:14:48 -05:00
parent 50e8eee6c2
commit c4e3684f15
2 changed files with 17 additions and 14 deletions

View File

@@ -164,17 +164,6 @@ var dtpPanel = Utils.defineClass({
this.panel.add_child(this._leftBox);
this.panel.add_child(this._centerBox);
this.panel.add_child(this._rightBox);
if (position == St.Side.TOP) {
this.panel._leftCorner = new Panel.PanelCorner(St.Side.LEFT);
this.panel._rightCorner = new Panel.PanelCorner(St.Side.RIGHT);
Utils.wrapActor(this.panel._leftCorner);
Utils.wrapActor(this.panel._rightCorner);
this.panel.add_child(this.panel._leftCorner.actor);
this.panel.add_child(this.panel._rightCorner.actor);
}
} else {
this.panel = Main.panel;
this.statusArea = Main.panel.statusArea;
@@ -186,6 +175,20 @@ var dtpPanel = Utils.defineClass({
}
this.panel.actor._delegate = this;
if (position == St.Side.TOP) {
this.panel._leftCorner = this.panel._leftCorner || new Panel.PanelCorner(St.Side.LEFT);
this.panel._rightCorner = this.panel._rightCorner || new Panel.PanelCorner(St.Side.RIGHT);
Utils.wrapActor(this.panel._leftCorner);
Utils.wrapActor(this.panel._rightCorner);
if (isSecondary) {
this.panel.add_child(this.panel._leftCorner.actor);
this.panel.add_child(this.panel._rightCorner.actor);
}
}
this.add_child(this.panel.actor);
if (Main.panel._onButtonPress) {

View File

@@ -39,7 +39,7 @@ var DynamicTransparency = Utils.defineClass({
this._initialPanelStyle = dtpPanel.panel.actor.get_style();
if (this._dtpPanel.panel._leftCorner) {
if (this._dtpPanel.geom.position == St.Side.TOP) {
this._initialPanelCornerStyle = dtpPanel.panel._leftCorner.actor.get_style();
}
@@ -57,7 +57,7 @@ var DynamicTransparency = Utils.defineClass({
this._dtpPanel.panel.actor.set_style(this._initialPanelStyle);
if (this._dtpPanel.panel._leftCorner) {
if (this._dtpPanel.geom.position == St.Side.TOP) {
this._dtpPanel.panel._leftCorner.actor.set_style(this._initialPanelCornerStyle);
this._dtpPanel.panel._rightCorner.actor.set_style(this._initialPanelCornerStyle);
}
@@ -217,7 +217,7 @@ var DynamicTransparency = Utils.defineClass({
this._dtpPanel.set_style('background-color: ' + this.currentBackgroundColor + transition + this._complementaryStyles);
if (this._dtpPanel.panel._leftCorner) {
if (this._dtpPanel.geom.position == St.Side.TOP) {
this._dtpPanel.panel._leftCorner.actor.set_style(cornerStyle);
this._dtpPanel.panel._rightCorner.actor.set_style(cornerStyle);
}