diff --git a/Settings.ui b/Settings.ui index 118d7f4..4cfd151 100644 --- a/Settings.ui +++ b/Settings.ui @@ -1,18 +1,18 @@ - + - 0.33000000000000002 + 0.33 1 0.01 - 0.10000000000000001 + 0.1 - 0.33000000000000002 + 0.33 1 0.01 - 0.10000000000000001 + 0.1 True @@ -1993,22 +1993,22 @@ 100 - 0.33000000000000002 + 0.33 1 0.01 - 0.10000000000000001 + 0.1 - 0.33000000000000002 + 0.33 1 0.01 - 0.10000000000000001 + 0.1 - 0.33000000000000002 + 0.33 1 0.01 - 0.10000000000000001 + 0.1 255 @@ -4026,10 +4026,10 @@ - 0.33000000000000002 + 0.33 1 0.01 - 0.10000000000000001 + 0.1 2000 @@ -4265,16 +4265,16 @@ - 0.33000000000000002 + 0.33 1 0.01 - 0.10000000000000001 + 0.1 - 0.33000000000000002 + 0.33 1 0.01 - 0.10000000000000001 + 0.1 True @@ -4478,6 +4478,23 @@ 0 + + + Apply position changes to all monitors + True + True + False + 12 + True + + + 0 + 1 + + + + + False diff --git a/panel.js b/panel.js index 4016a0e..db6bd82 100644 --- a/panel.js +++ b/panel.js @@ -528,7 +528,9 @@ var dtpPanel = Utils.defineClass({ }, updateElementPositions: function() { - this._updateGroupedElements(); + let panelPositions = this.panelManager.panelsElementPositions[this.monitor.index] || Pos.defaults; + + this._updateGroupedElements(panelPositions); this._disablePanelCornerSignals(); @@ -554,8 +556,7 @@ var dtpPanel = Utils.defineClass({ this.panel.actor.show(); }, - _updateGroupedElements: function() { - let panelPositions = this.panelManager.panelsElementPositions[this.monitor.index] || Pos.defaults; + _updateGroupedElements: function(panelPositions) { let previousPosition = 0; let currentGroup = -1; @@ -1004,8 +1005,8 @@ var dtpPanel = Utils.defineClass({ childBoxLeftCorner[fixedCoord.c1] = panelAllocFixedSize; childBoxLeftCorner[fixedCoord.c2] = panelAllocFixedSize + this.cornerSize; - childBoxRightCorner[varCoord.c1] = panelAllocVarSize - this.cornerSize; - childBoxRightCorner[varCoord.c2] = panelAllocVarSize; + childBoxRightCorner[varCoord.c1] = box[varCoord.c2] - this.cornerSize; + childBoxRightCorner[varCoord.c2] = box[varCoord.c2]; childBoxRightCorner[fixedCoord.c1] = panelAllocFixedSize; childBoxRightCorner[fixedCoord.c2] = panelAllocFixedSize + this.cornerSize; diff --git a/prefs.js b/prefs.js index 329feed..7dc75e0 100644 --- a/prefs.js +++ b/prefs.js @@ -220,6 +220,8 @@ const Settings = new Lang.Class({ let panelInfo = positionSettings[monitorIndex] || Pos.defaults; let updateSettings = () => { let newPanelInfo = []; + let monitorSync = this._settings.get_boolean('panel-element-positions-monitors-sync'); + let monitors = monitorSync ? this.monitors : [monitorIndex]; taskbarListBox.get_children().forEach(c => { newPanelInfo.push({ @@ -229,7 +231,7 @@ const Settings = new Lang.Class({ }); }); - positionSettings[monitorIndex] = newPanelInfo; + monitors.forEach(m => positionSettings[m] = newPanelInfo); this._settings.set_string('panel-element-positions', JSON.stringify(positionSettings)); }; @@ -263,8 +265,8 @@ const Settings = new Lang.Class({ } }; - positionCombo.append(Pos.STACKED_TL, isVertical ? _('Stacked top') : _('Stacked left')); - positionCombo.append(Pos.STACKED_BR, isVertical ? _('Stacked bottom') :_('Stacked right')); + positionCombo.append(Pos.STACKED_TL, isVertical ? _('Stacked to top') : _('Stacked to left')); + positionCombo.append(Pos.STACKED_BR, isVertical ? _('Stacked to bottom') :_('Stacked to right')); positionCombo.append(Pos.CENTERED, _('Centered')); positionCombo.append(Pos.CENTERED_MONITOR, _('Monitor Center')); positionCombo.set_active_id(el.position); @@ -705,6 +707,16 @@ const Settings = new Lang.Class({ this._builder.get_object('multimon_primary_combo').set_active(dtpPrimaryMonitorIndex); this._builder.get_object('taskbar_position_monitor_combo').set_active(dtpPrimaryMonitorIndex); + this._settings.bind('panel-element-positions-monitors-sync', + this._builder.get_object('taskbar_position_sync_button'), + 'active', + Gio.SettingsBindFlags.DEFAULT); + + this._settings.bind('panel-element-positions-monitors-sync', + this._builder.get_object('taskbar_position_monitor_combo'), + 'sensitive', + Gio.SettingsBindFlags.INVERT_BOOLEAN); + this._builder.get_object('multimon_primary_combo').connect('changed', Lang.bind (this, function(widget) { this._settings.set_int('primary-monitor', this.monitors[widget.get_active()]); })); diff --git a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml index 64abeeb..147a8a0 100644 --- a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml +++ b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml @@ -72,6 +72,11 @@ Panel position Panel is shown on the Bottom or Top of the screen. + + true + Sync element positions + Sync panel element positions on all monitors. + '{}' Panel element positions diff --git a/stylesheet.css b/stylesheet.css index 1f23906..126789e 100644 --- a/stylesheet.css +++ b/stylesheet.css @@ -28,6 +28,7 @@ #dashtopanelScrollview .app-well-app .overview-icon, .dashtopanelMainPanel .show-apps .overview-icon { + background: none; border: none; margin: 0; padding: 0; @@ -43,6 +44,7 @@ background: none; } +.dashtopanelMainPanel .show-apps:hover .overview-icon, #dashtopanelScrollview .app-well-app:hover .dtp-container, #dashtopanelScrollview .app-well-app:focus .dtp-container { background-color: rgba(238, 238, 236, 0.1);