diff --git a/Settings.ui b/Settings.ui
index 052397f..b6c59fe 100644
--- a/Settings.ui
+++ b/Settings.ui
@@ -3972,6 +3972,7 @@
12
12
12
+ 4
32
+
+
+
+ 0
+ 1
+
+
+
+
+
+ 1
+ 0
+ 1
+
+
diff --git a/panel.js b/panel.js
index c55a148..e361c27 100644
--- a/panel.js
+++ b/panel.js
@@ -664,7 +664,17 @@ var dtpPanel = Utils.defineClass({
[
Me.settings,
'changed::showdesktop-button-width',
- () => this._setShowDesktopButtonSize()
+ () => this._setShowDesktopButtonStyle()
+ ],
+ [
+ Me.settings,
+ 'changed::desktop-line-use-custom-color',
+ () => this._setShowDesktopButtonStyle()
+ ],
+ [
+ Me.settings,
+ 'changed::desktop-line-custom-color',
+ () => this._setShowDesktopButtonStyle()
],
[
Me.desktopSettings,
@@ -1253,7 +1263,7 @@ var dtpPanel = Utils.defineClass({
y_fill: true,
track_hover: true });
- this._setShowDesktopButtonSize();
+ this._setShowDesktopButtonStyle();
this._showDesktopButton.connect('button-press-event', () => this._onShowDesktopButtonPress());
this._showDesktopButton.connect('enter-event', () => {
@@ -1290,11 +1300,16 @@ var dtpPanel = Utils.defineClass({
}
},
- _setShowDesktopButtonSize: function() {
+ _setShowDesktopButtonStyle: function() {
if (this._showDesktopButton) {
let buttonSize = Me.settings.get_int('showdesktop-button-width') + 'px;';
let isVertical = this.checkIfVertical();
- let sytle = isVertical ? 'border-top-width:1px;height:' + buttonSize : 'border-left-width:1px;width:' + buttonSize;
+
+ let lineRgbaColor = Me.settings.get_string('desktop-line-custom-color');
+ let isLineCustom = Me.settings.get_boolean('desktop-line-use-custom-color');
+
+ let sytle = isLineCustom ? 'border:0 solid ' + lineRgbaColor + ';' : '';
+ sytle += isVertical ? 'border-top-width:1px;height:' + buttonSize : 'border-left-width:1px;width:' + buttonSize;
this._showDesktopButton.set_style(sytle);
this._showDesktopButton[(isVertical ? 'x' : 'y') + '_expand'] = true;
diff --git a/prefs.js b/prefs.js
index 4eeb162..08fe22c 100644
--- a/prefs.js
+++ b/prefs.js
@@ -920,6 +920,24 @@ const Settings = new Lang.Class({
dialog.show_all();
}));
+
+ this._settings.bind('desktop-line-use-custom-color',
+ this._builder.get_object('override_show_desktop_line_color_switch'),
+ 'active',
+ Gio.SettingsBindFlags.DEFAULT);
+
+ this._settings.bind('desktop-line-use-custom-color',
+ this._builder.get_object('override_show_desktop_line_color_colorbutton'),
+ 'sensitive',
+ Gio.SettingsBindFlags.DEFAULT);
+
+ rgba.parse(this._settings.get_string('desktop-line-custom-color'));
+ this._builder.get_object('override_show_desktop_line_color_colorbutton').set_rgba(rgba);
+ this._builder.get_object('override_show_desktop_line_color_colorbutton').connect('notify::color', Lang.bind(this, function (button) {
+ let rgba = button.get_rgba();
+ let css = rgba.to_string();
+ this._settings.set_string('desktop-line-custom-color', css);
+ }));
this._settings.bind('intellihide',
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 5fb3501..a18665c 100644
--- a/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
+++ b/schemas/org.gnome.shell.extensions.dash-to-panel.gschema.xml
@@ -92,6 +92,16 @@
Panel size
Set the size of the panel.
+
+ false
+ Override Show Desktop line color
+ Replace current Show Desktop button line color
+
+
+ "rgba(200,200,200,0.2)"
+ Custom Show Desktop line color
+ Custom Show Desktop button line color
+
'BOTTOM'
Dot position