mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-15 00:34:05 +09:00
So long, corners
This commit is contained in:
88
panel.js
88
panel.js
@@ -96,7 +96,6 @@ var Panel = GObject.registerClass({
|
||||
this._sessionStyle = null;
|
||||
this._unmappedButtons = [];
|
||||
this._elementGroups = [];
|
||||
this.cornerSize = 0;
|
||||
|
||||
let systemMenuInfo = Utils.getSystemMenuInfo();
|
||||
|
||||
@@ -184,25 +183,6 @@ var Panel = GObject.registerClass({
|
||||
|
||||
this.geom = this.getGeometry();
|
||||
|
||||
let isTop = this.geom.position == St.Side.TOP;
|
||||
|
||||
if (isTop && Config.PACKAGE_VERSION < '42') {
|
||||
this.panel._leftCorner = this.panel._leftCorner || new GSPanel.PanelCorner(St.Side.LEFT);
|
||||
this.panel._rightCorner = this.panel._rightCorner || new GSPanel.PanelCorner(St.Side.RIGHT);
|
||||
}
|
||||
|
||||
if (Config.PACKAGE_VERSION < '42' && this.panel._leftCorner) {
|
||||
if (isTop) {
|
||||
if (this.isStandalone) {
|
||||
this.panel.add_child(this.panel._leftCorner);
|
||||
this.panel.add_child(this.panel._rightCorner);
|
||||
}
|
||||
} else {
|
||||
this.panel.remove_child(this.panel._leftCorner);
|
||||
this.panel.remove_child(this.panel._rightCorner);
|
||||
}
|
||||
}
|
||||
|
||||
this._setPanelPosition();
|
||||
|
||||
if (!this.isStandalone) {
|
||||
@@ -347,7 +327,6 @@ var Panel = GObject.registerClass({
|
||||
|
||||
this._timeoutsHandler.destroy();
|
||||
this._signalsHandler.destroy();
|
||||
this._disablePanelCornerSignals();
|
||||
|
||||
this.panel.remove_child(this.taskbar.actor);
|
||||
this._setAppmenuVisible(false);
|
||||
@@ -398,11 +377,6 @@ var Panel = GObject.registerClass({
|
||||
});
|
||||
}
|
||||
|
||||
if (Config.PACKAGE_VERSION < '42' && !this.panel._leftCorner.mapped) {
|
||||
this.panel.add_child(this.panel._leftCorner);
|
||||
this.panel.add_child(this.panel._rightCorner);
|
||||
}
|
||||
|
||||
this._setShowDesktopButton(false);
|
||||
|
||||
delete Utils.getIndicators(this.statusArea[systemMenuName]._volume)._dtpIgnoreScroll;
|
||||
@@ -465,26 +439,6 @@ var Panel = GObject.registerClass({
|
||||
|
||||
this._updateGroupedElements(panelPositions);
|
||||
|
||||
this._disablePanelCornerSignals();
|
||||
|
||||
if (Config.PACKAGE_VERSION < '42' && this.getPosition() == St.Side.TOP) {
|
||||
let visibleElements = panelPositions.filter(pp => pp.visible);
|
||||
let connectCorner = (corner, button) => {
|
||||
corner._button = button;
|
||||
corner._buttonStyleChangedSignalId = button.connect('style-changed', () => {
|
||||
corner.set_style_pseudo_class(button.get_style_pseudo_class());
|
||||
});
|
||||
}
|
||||
|
||||
if (visibleElements[0].element == Pos.ACTIVITIES_BTN) {
|
||||
connectCorner(this.panel._leftCorner, this.statusArea.activities);
|
||||
}
|
||||
|
||||
if (visibleElements[visibleElements.length - 1].element == Pos.SYSTEM_MENU) {
|
||||
connectCorner(this.panel._rightCorner, this.statusArea.aggregateMenu);
|
||||
}
|
||||
}
|
||||
|
||||
this.panel.hide();
|
||||
this.panel.show();
|
||||
}
|
||||
@@ -539,20 +493,6 @@ var Panel = GObject.registerClass({
|
||||
});
|
||||
}
|
||||
|
||||
_disablePanelCornerSignals() {
|
||||
if (Config.PACKAGE_VERSION < '42') {
|
||||
if (this.panel._rightCorner && this.panel._rightCorner._buttonStyleChangedSignalId) {
|
||||
this.panel._rightCorner._button.disconnect(this.panel._rightCorner._buttonStyleChangedSignalId);
|
||||
delete this.panel._rightCorner._buttonStyleChangedSignalId;
|
||||
}
|
||||
|
||||
if (this.panel._leftCorner && this.panel._leftCorner._buttonStyleChangedSignalId) {
|
||||
this.panel._leftCorner._button.disconnect(this.panel._leftCorner._buttonStyleChangedSignalId);
|
||||
delete this.panel._leftCorner._buttonStyleChangedSignalId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_bindSettingsChanges() {
|
||||
let isVertical = this.checkIfVertical();
|
||||
|
||||
@@ -927,32 +867,6 @@ var Panel = GObject.registerClass({
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.geom.position == St.Side.TOP && Config.PACKAGE_VERSION < '42') {
|
||||
let childBoxLeftCorner = new Clutter.ActorBox();
|
||||
let childBoxRightCorner = new Clutter.ActorBox();
|
||||
let currentCornerSize = this.cornerSize;
|
||||
let panelAllocFixedSize = box[this.fixedCoord.c2] - box[this.fixedCoord.c1];
|
||||
|
||||
[ , this.cornerSize] = this.panel._leftCorner[this.sizeFunc](-1);
|
||||
|
||||
childBoxLeftCorner[this.varCoord.c1] = 0;
|
||||
childBoxLeftCorner[this.varCoord.c2] = this.cornerSize;
|
||||
childBoxLeftCorner[this.fixedCoord.c1] = panelAllocFixedSize;
|
||||
childBoxLeftCorner[this.fixedCoord.c2] = panelAllocFixedSize + this.cornerSize;
|
||||
|
||||
childBoxRightCorner[this.varCoord.c1] = box[this.varCoord.c2] - this.cornerSize;
|
||||
childBoxRightCorner[this.varCoord.c2] = box[this.varCoord.c2];
|
||||
childBoxRightCorner[this.fixedCoord.c1] = panelAllocFixedSize;
|
||||
childBoxRightCorner[this.fixedCoord.c2] = panelAllocFixedSize + this.cornerSize;
|
||||
|
||||
this.panel._leftCorner.allocate(childBoxLeftCorner);
|
||||
this.panel._rightCorner.allocate(childBoxRightCorner);
|
||||
|
||||
if (this.cornerSize != currentCornerSize) {
|
||||
this._setPanelClip();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_setPanelPosition() {
|
||||
@@ -978,7 +892,7 @@ var Panel = GObject.registerClass({
|
||||
|
||||
_setPanelClip(clipContainer) {
|
||||
clipContainer = clipContainer || this.panelBox.get_parent();
|
||||
this._timeoutsHandler.add([T7, 0, () => Utils.setClip(clipContainer, clipContainer.x, clipContainer.y, this.panelBox.width, this.panelBox.height + this.cornerSize)]);
|
||||
this._timeoutsHandler.add([T7, 0, () => Utils.setClip(clipContainer, clipContainer.x, clipContainer.y, this.panelBox.width, this.panelBox.height)]);
|
||||
}
|
||||
|
||||
_onButtonPress(actor, event) {
|
||||
|
||||
@@ -134,9 +134,6 @@
|
||||
background-color: rgba(55, 55, 55, .4);
|
||||
}
|
||||
|
||||
.panel-corner.hidden:active, .panel-corner.hidden:overview, .panel-corner.hidden:focus {
|
||||
-panel-corner-border-color: rgba(0, 0, 0, .001);
|
||||
}
|
||||
#dashtopanelScrollview .badge {
|
||||
color: rgba(255, 255, 255, 1);
|
||||
font-weight: bold;
|
||||
|
||||
@@ -37,10 +37,6 @@ var DynamicTransparency = class {
|
||||
|
||||
this._initialPanelStyle = dtpPanel.panel.get_style();
|
||||
|
||||
if (Config.PACKAGE_VERSION < '42' && this._dtpPanel.geom.position == St.Side.TOP) {
|
||||
this._initialPanelCornerStyle = dtpPanel.panel._leftCorner.get_style();
|
||||
}
|
||||
|
||||
this._signalsHandler = new Utils.GlobalSignalsHandler();
|
||||
this._bindSignals();
|
||||
|
||||
@@ -54,11 +50,6 @@ var DynamicTransparency = class {
|
||||
this._proximityManager.removeWatch(this._proximityWatchId);
|
||||
|
||||
this._dtpPanel.panel.set_style(this._initialPanelStyle);
|
||||
|
||||
if (Config.PACKAGE_VERSION < '42' && this._dtpPanel.geom.position == St.Side.TOP) {
|
||||
this._dtpPanel.panel._leftCorner.set_style(this._initialPanelCornerStyle);
|
||||
this._dtpPanel.panel._rightCorner.set_style(this._initialPanelCornerStyle);
|
||||
}
|
||||
}
|
||||
|
||||
updateExternalStyle() {
|
||||
@@ -222,12 +213,6 @@ var DynamicTransparency = class {
|
||||
let transition = 'transition-duration:' + this.animationDuration;
|
||||
|
||||
this._dtpPanel.set_style('background-color: ' + this.currentBackgroundColor + transition + this._complementaryStyles);
|
||||
|
||||
if (Config.PACKAGE_VERSION < '42' && this._dtpPanel.geom.position == St.Side.TOP) {
|
||||
let cornerStyle = '-panel-corner-background-color: ' + this.currentBackgroundColor + transition;
|
||||
this._dtpPanel.panel._leftCorner.set_style(cornerStyle);
|
||||
this._dtpPanel.panel._rightCorner.set_style(cornerStyle);
|
||||
}
|
||||
}
|
||||
|
||||
_setGradient() {
|
||||
|
||||
Reference in New Issue
Block a user