mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Fix panelcorner actor warning on 3.53.3
This commit is contained in:
25
panel.js
25
panel.js
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user