mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Fix intellihide container
This commit is contained in:
@@ -65,12 +65,12 @@ var Intellihide = Utils.defineClass({
|
||||
this._intellihideChangedId = this._dtpSettings.connect('changed::intellihide', () => this._changeEnabledStatus());
|
||||
this._intellihideOnlySecondaryChangedId = this._dtpSettings.connect('changed::intellihide-only-secondary', () => this._changeEnabledStatus());
|
||||
|
||||
this._enabled = false;
|
||||
this.enabled = false;
|
||||
this._changeEnabledStatus();
|
||||
},
|
||||
|
||||
enable: function(reset) {
|
||||
this._enabled = true;
|
||||
this.enabled = true;
|
||||
this._monitor = this._dtpPanel.monitor;
|
||||
this._animationDestination = -1;
|
||||
this._pendingUpdate = false;
|
||||
@@ -117,14 +117,14 @@ var Intellihide = Utils.defineClass({
|
||||
|
||||
this._revealPanel(!reset);
|
||||
|
||||
this._enabled = false;
|
||||
this.enabled = false;
|
||||
},
|
||||
|
||||
destroy: function() {
|
||||
this._dtpSettings.disconnect(this._intellihideChangedId);
|
||||
this._dtpSettings.disconnect(this._intellihideOnlySecondaryChangedId);
|
||||
|
||||
if (this._enabled) {
|
||||
if (this.enabled) {
|
||||
this.disable();
|
||||
}
|
||||
},
|
||||
@@ -134,7 +134,7 @@ var Intellihide = Utils.defineClass({
|
||||
},
|
||||
|
||||
revealAndHold: function(holdStatus) {
|
||||
if (this._enabled && !this._holdStatus) {
|
||||
if (this.enabled && !this._holdStatus) {
|
||||
this._revealPanel();
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ var Intellihide = Utils.defineClass({
|
||||
release: function(holdStatus) {
|
||||
this._holdStatus -= holdStatus;
|
||||
|
||||
if (this._enabled && !this._holdStatus) {
|
||||
if (this.enabled && !this._holdStatus) {
|
||||
this._queueUpdatePanelPosition();
|
||||
}
|
||||
},
|
||||
@@ -159,7 +159,7 @@ var Intellihide = Utils.defineClass({
|
||||
let onlySecondary = this._dtpSettings.get_boolean('intellihide-only-secondary');
|
||||
let enabled = intellihide && (this._dtpPanel.isSecondary || !onlySecondary);
|
||||
|
||||
if (this._enabled !== enabled) {
|
||||
if (this.enabled !== enabled) {
|
||||
this[enabled ? 'enable' : 'disable']();
|
||||
}
|
||||
},
|
||||
|
||||
11
panel.js
11
panel.js
@@ -517,6 +517,7 @@ var dtpPanelWrapper = Utils.defineClass({
|
||||
_setPanelPosition: function() {
|
||||
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||
let size = this._dtpSettings.get_int('panel-size');
|
||||
let container = this.intellihide && this.intellihide.enabled ? this.panelBox.get_parent() : this.panelBox;
|
||||
|
||||
if(scaleFactor)
|
||||
size = size*scaleFactor;
|
||||
@@ -530,7 +531,7 @@ var dtpPanelWrapper = Utils.defineClass({
|
||||
this._myPanelGhost.set_height(isTop ? 0 : size);
|
||||
|
||||
if(isTop) {
|
||||
this.panelBox.set_position(this.monitor.x, this.monitor.y);
|
||||
container.set_position(this.monitor.x, this.monitor.y);
|
||||
|
||||
this._removeTopLimit();
|
||||
|
||||
@@ -541,7 +542,7 @@ var dtpPanelWrapper = Utils.defineClass({
|
||||
if(!this.panel.actor.has_style_class_name('dashtopanelTop'))
|
||||
this.panel.actor.add_style_class_name('dashtopanelTop');
|
||||
} else {
|
||||
this.panelBox.set_position(this.monitor.x, this.monitor.y + this.monitor.height - this.panelBox.height);
|
||||
container.set_position(this.monitor.x, this.monitor.y + this.monitor.height - this.panelBox.height);
|
||||
|
||||
if (!this._topLimit) {
|
||||
this._topLimit = new St.BoxLayout({ name: 'topLimit', vertical: true });
|
||||
@@ -841,15 +842,15 @@ var dtpSecondaryPanel = Utils.defineClass({
|
||||
},
|
||||
|
||||
//next 3 functions are needed by other extensions to add elements to the secondary panel
|
||||
addToStatusArea(role, indicator, position, box) {
|
||||
addToStatusArea: function(role, indicator, position, box) {
|
||||
return Main.panel.addToStatusArea.call(this, role, indicator, position, box);
|
||||
},
|
||||
|
||||
_addToPanelBox(role, indicator, position, box) {
|
||||
_addToPanelBox: function(role, indicator, position, box) {
|
||||
Main.panel._addToPanelBox.call(this, role, indicator, position, box);
|
||||
},
|
||||
|
||||
_onMenuSet(indicator) {
|
||||
_onMenuSet: function(indicator) {
|
||||
Main.panel._onMenuSet.call(this, indicator);
|
||||
},
|
||||
});
|
||||
|
||||
@@ -363,7 +363,10 @@ var taskbar = Utils.defineClass({
|
||||
this._showAppsIconWrapper.destroy();
|
||||
|
||||
this._container.destroy();
|
||||
|
||||
this.previewMenu.disable();
|
||||
this.previewMenu.destroy();
|
||||
|
||||
this._disconnectWorkspaceSignals();
|
||||
},
|
||||
|
||||
|
||||
@@ -153,10 +153,8 @@ var PreviewMenu = Utils.defineClass({
|
||||
|
||||
this.close(true);
|
||||
|
||||
Main.layoutManager._untrackActor(this);
|
||||
Main.uiGroup.remove_child(this);
|
||||
|
||||
this.destroy();
|
||||
Main.layoutManager.untrackChrome(this.menu);
|
||||
Main.layoutManager.removeChrome(this);
|
||||
},
|
||||
|
||||
requestOpen: function(appIcon) {
|
||||
|
||||
Reference in New Issue
Block a user