Configure panel thickness, length, and anchor per-monitor

Settings.ui:
- Move thickness, length, and anchor from Style tab to Position tab.
Group together with position in the same frame.

schema:
- Remove unpublished panel-length and panel-anchor settings, replacing
them with panel-lengths and panel-anchors JSON objects (like
panel-positions).
- Remove unpublished anchor enum, since panel-anchors is being managed
by the extension in JSON, not typed by the schema.
- Deprecate panel-size in favour of new panel-sizes JSON, storing
per-monitor panel sizes.
- Mention that panel-position is deprecated.

Introduce panelSettings.js:
- Functions to fetch or set panel settings that are stored as JSON.
Grown from now-removed getSettingsPositions() in panelPositions.js.

prefs.js:
- Group together the different UI widget label and value refreshing
into method _updateWidgetSettingsForMonitor().
- Change multi-panel behaviour of _setAnchorLabels(). Previously, all
panels shared the same anchor setting, and so setAnchorLabels
considered all monitors. Now, panels are configured either
independently, or sometimes all together; set labels according to
orientation(s) of panel(s) being configured.
- Omitting preventTop handling in refactored _setPanelPosition()
method. Previously, it was written to set the first monitor's panel to
Pos.BOTTOM if the user clicked the Top position radio button, if
stockgs-keep-top-panel was also set. But the user can't activate the
Top button anyway if stockgs is set (likely implemented later).

panelManager.js:
- Removing panelPositions, as it is not needed any more.
This commit is contained in:
MarkS
2020-10-27 16:04:19 -06:00
parent 29c107041b
commit a57058661a
12 changed files with 527 additions and 396 deletions

View File

@@ -40,11 +40,6 @@
<value value='2' nick='LEFT'/>
<value value='3' nick='RIGHT'/>
</enum>
<enum id='org.gnome.shell.extensions.dash-to-panel.anchor'>
<value value='0' nick='START'/>
<value value='1' nick='MIDDLE'/>
<value value='2' nick='END'/>
</enum>
<enum id='org.gnome.shell.extensions.dash-to-panel.proximityBehavior'>
<value value='0' nick='ALL_WINDOWS'/>
<value value='1' nick='FOCUSED_WINDOWS'/>
@@ -74,7 +69,7 @@
</key>
<key name="panel-position" enum="org.gnome.shell.extensions.dash-to-panel.position">
<default>'BOTTOM'</default>
<summary>Panel position</summary>
<summary>Panel position (Deprecated)</summary>
<description>Panel is shown on the Bottom or Top of the screen.</description>
</key>
<key name="panel-element-positions-monitors-sync" type="b">
@@ -92,19 +87,24 @@
<summary>Panel element positions</summary>
<description>Panel element positions (JSON).</description>
</key>
<key type="i" name="panel-length">
<default>100</default>
<summary>Percentage of screen edge for panel to span</summary>
<description>Length of the panel, in percent.</description>
<key type="s" name="panel-lengths">
<default>'{}'</default>
<summary>Percentages of screen edge for panel to span</summary>
<description>Length of the panels, in percent (JSON).</description>
</key>
<key name="panel-anchor" enum="org.gnome.shell.extensions.dash-to-panel.anchor">
<default>'MIDDLE'</default>
<summary>Position along screen edge</summary>
<description>Where to show the panel if it is not the full length of the screen edge.</description>
<key type="s" name="panel-anchors">
<default>'{}'</default>
<summary>Positions along screen edge</summary>
<description>Where to show the panels if it is not the full length of the screen edge (JSON).</description>
</key>
<key type="s" name="panel-sizes">
<default>'{}'</default>
<summary>Panel sizes</summary>
<description>Sizes of panels, in pixels.</description>
</key>
<key type="i" name="panel-size">
<default>48</default>
<summary>Panel size</summary>
<summary>Panel size (Deprecated)</summary>
<description>Set the size of the panel.</description>
</key>
<key type="b" name="desktop-line-use-custom-color">