diff --git a/Makefile b/Makefile
index adb68f047..59b2c815b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# Basic Makefile
-UUID = dash-to-dock@micxgx.gmail.com
+UUID = floating-dock@nandoferreira_prof@hotmail.com
BASE_MODULES = extension.js metadata.json COPYING README.md
EXTRA_MODULES = dash.js docking.js appIcons.js appIconIndicators.js fileManager1API.js launcherAPI.js locations.js windowPreview.js intellihide.js prefs.js theming.js utils.js dbusmenuUtils.js Settings.ui
EXTRA_MEDIA = logo.svg glossy.svg highlight_stacked_bg.svg highlight_stacked_bg_h.svg
@@ -14,7 +14,7 @@ else
SHARE_PREFIX = $(DESTDIR)/usr/share
INSTALLBASE = $(SHARE_PREFIX)/gnome-shell/extensions
endif
-INSTALLNAME = dash-to-dock@micxgx.gmail.com
+INSTALLNAME = floating-dock@nandoferreira_prof@hotmail.com
# The command line passed variable VERSION is used to set the version string
# in the metadata and in the generated zip-file. If no VERSION is passed, the
@@ -48,7 +48,7 @@ mergepo: potfile
./po/dashtodock.pot: $(TOLOCALIZE) Settings.ui
mkdir -p po
- xgettext -k --keyword=__ --keyword=N__ --add-comments='Translators:' -o po/dashtodock.pot --package-name "Dash to Dock" --from-code=utf-8 $(TOLOCALIZE)
+ xgettext -k --keyword=__ --keyword=N__ --add-comments='Translators:' -o po/dashtodock.pot --package-name "Floating Dock" --from-code=utf-8 $(TOLOCALIZE)
intltool-extract --type=gettext/glade Settings.ui
xgettext -k --keyword=_ --keyword=N_ --join-existing -o po/dashtodock.pot Settings.ui.h
diff --git a/README.md b/README.md
index 1c76c699f..2bf89f9cf 100644
--- a/README.md
+++ b/README.md
@@ -1,22 +1,27 @@
-# Dash to Dock
-![screenshot](https://github.com/micheleg/dash-to-dock/raw/master/media/screenshot.jpg)
+# Floating Dock
-## A dock for the GNOME Shell
-This extension enhances the dash moving it out of the overview and transforming it in a dock for an easier launching of applications and a faster switching between windows and desktops without having to leave the desktop view.
+Floating dock is just a dash-to-dock fork, originaly made by Michele Gaio
-[](https://extensions.gnome.org/extension/307/dash-to-dock)
+now you can edit the margin and border-radius from the dock
-For additional installation instructions and more information visit [https://micheleg.github.io/dash-to-dock/](https://micheleg.github.io/dash-to-dock/).
+![Floating Dock Left](./media/dock_left.png)
+
+![Floating Dock Bottom](./media/dock_bottom.png)
-## Installation from source
+# TODO
+
+- add hook to Dash to Panel
+- add abillity to use blur-provider
+- option to disable notification bubble
+- option to remove the application indicators
+- More customization like, border-radius of app icon, zoom on hover icons
-The extension can be installed directly from source, either for the convenience of using git or to test the latest development version. Clone the desired branch with git
### Build Dependencies
-To compile the stylesheet you'll need an implementation of SASS. Dash to Dock supports `dart-sass` (`sass`), `sassc`, and `ruby-sass`. Every distro should have at least one of these implementations, we recommend using `dart-sass` (`sass`) or `sassc` over `ruby-sass` as `ruby-sass` is deprecated.
+To compile the stylesheet you'll need an implementation of SASS. Floating Dock supports `dart-sass` (`sass`), `sassc`, and `ruby-sass`. Every distro should have at least one of these implementations, we recommend using `dart-sass` (`sass`) or `sassc` over `ruby-sass` as `ruby-sass` is deprecated.
-By default, Dash to Dock will attempt to build with `dart-sass`. To change this behavior set the `SASS` environment variable to either `sassc` or `ruby`.
+By default, Floating Dock will attempt to build with `dart-sass`. To change this behavior set the `SASS` environment variable to either `sassc` or `ruby`.
```bash
export SASS=sassc
@@ -31,15 +36,15 @@ Clone the repository or download the branch from github. A simple Makefile is in
Next use `make` to install the extension into your home directory. A Shell reload is required `Alt+F2 r Enter` under Xorg or under Wayland you may have to logout and login. The extension has to be enabled with *gnome-extensions-app* (GNOME Extensions) or with *dconf*.
```bash
-git clone https://github.com/micheleg/dash-to-dock.git
+git clone https://github.com/fer-moreira/floating-dock.git
make
make install
```
## Bug Reporting
-Bugs should be reported to the Github bug tracker [https://github.com/micheleg/dash-to-dock/issues](https://github.com/micheleg/dash-to-dock/issues).
+Bugs should be reported to the Github bug tracker [https://github.com/fer-moreira/floating-dock/issues](https://github.com/fer-moreira/floating-dock/issues).
## License
-Dash to Dock Gnome Shell extension is distributed under the terms of the GNU General Public License,
+Floating Dock Gnome Shell extension is distributed under the terms of the GNU General Public License,
version 2 or later. See the COPYING file for details.
diff --git a/Settings.ui b/Settings.ui
index d1296619a..81a6a97fc 100644
--- a/Settings.ui
+++ b/Settings.ui
@@ -245,6 +245,19 @@
0.010.10
+
+
+
+
+
+
+
+
+
+
+
+
+ 100
+ 80
+
+
+ 0
+ 32
+ 12
+ 12
+ 12
+ 12
+
+
+ 0
+ 0
+ center
+ start
+ Margin
+
+
+
+
+
+ 1
+ 1
+ custom_margin_adjustment
+
+ 0
+ 0
+ 0
+ 0
+ right
+
+
+
+
+
+
+
+
@@ -2035,7 +2132,7 @@
0
- <b>Dash to Dock</b>
+ <b>Floating Dock</b>1
diff --git a/_stylesheet.scss b/_stylesheet.scss
index ff5db7a75..ca8ef73af 100644
--- a/_stylesheet.scss
+++ b/_stylesheet.scss
@@ -77,6 +77,8 @@ $osd_fg_color: #eeeeec;
padding: $dash_spacing;
padding-#{$side}: $dash_padding + $dock_side_margin;
padding-#{opposite($side)}: $dash_padding;
+
+ border-radius: 100px;
}
}
}
@@ -352,3 +354,15 @@ $osd_fg_color: #eeeeec;
background-size: contain;
}
}
+
+.app-well-app {
+ border-radius: 13px;
+ }
+
+.app-well-app * {
+ border-radius: 13px;
+}
+
+.show-apps * {
+ border-radius: 13px;
+}
diff --git a/appIcons.js b/appIcons.js
index cca364174..68bd69953 100644
--- a/appIcons.js
+++ b/appIcons.js
@@ -184,13 +184,32 @@ var DockAbstractAppIcon = GObject.registerClass({
}
);
});
-
+''
this._updateState();
this._numberOverlay();
this.updateIconGeometry();
this._previewMenuManager = null;
this._previewMenu = null;
+
+
+ let effector_keys = [
+ 'border-radius',
+ ];
+
+ this._signalsHandler.add(...effector_keys.map(key => [
+ Docking.DockManager.settings,
+ `changed::${key}`,
+ () => this.updateIconTheming(),
+ ]));
+ }
+
+ updateIconTheming()
+ {
+ let settings = Docking.DockManager.settings;
+ this._border_radius = settings.get_int('border-radius');
+ let newStyle = 'border-radius: ' + this._border_radius + "px;";
+ this.get_children()[0].set_style(newStyle);
}
_onDestroy() {
@@ -1351,7 +1370,7 @@ class DockShowAppsIconMenu extends DockAppIconMenu {
/* Translators: %s is "Settings", which is automatically translated. You
can also translate the full message if this fits better your language. */
- let name = __('Dash to Dock %s').format(_('Settings'))
+ let name = __('Floating Dock %s').format(_('Settings'))
let item = this._appendMenuItem(name);
item.connect('activate', function () {
diff --git a/media/dock_bottom.png b/media/dock_bottom.png
new file mode 100644
index 000000000..d553936b9
Binary files /dev/null and b/media/dock_bottom.png differ
diff --git a/media/dock_left.png b/media/dock_left.png
new file mode 100644
index 000000000..2ff150947
Binary files /dev/null and b/media/dock_left.png differ
diff --git a/media/github_preview.png b/media/github_preview.png
new file mode 100644
index 000000000..acf10a1f5
Binary files /dev/null and b/media/github_preview.png differ
diff --git a/media/logo.svg b/media/logo.svg
index eebd0b1d5..37857a8fa 100644
--- a/media/logo.svg
+++ b/media/logo.svg
@@ -1,528 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/metadata.json b/metadata.json
index 88faed7ba..3a1de476c 100644
--- a/metadata.json
+++ b/metadata.json
@@ -1,13 +1,14 @@
{
"shell-version": [
"40",
- "41"
+ "41",
+ "42"
],
-"uuid": "dash-to-dock@micxgx.gmail.com",
-"name": "Dash to Dock",
-"description": "A dock for the Gnome Shell. This extension moves the dash out of the overview transforming it in a dock for an easier launching of applications and a faster switching between windows and desktops. Side and bottom placement options are available.",
+"uuid": "floating-dock@nandoferreira_prof@hotmail.com",
+"name": "Floating Dock",
+"description": "A Custom Floating Dock fork, now you can change the margin and border radius of the dock.",
"original-author": "micxgx@gmail.com",
-"url": "https://micheleg.github.io/dash-to-dock/",
-"gettext-domain": "dashtodock",
-"version": 71
+"url": "https://github.com/fer-moreira/floating-dock",
+"gettext-domain": "floatingdock",
+"version": 4
}
diff --git a/po/ar.po b/po/ar.po
index 3bc311dd7..75b292720 100644
--- a/po/ar.po
+++ b/po/ar.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Dash to Dock\n"
+"Project-Id-Version: Floating Dock\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-04 12:35+0100\n"
"PO-Revision-Date: 2015-04-18 18:01+0100\n"
diff --git a/po/cs.po b/po/cs.po
index dc4f9a984..6b911de08 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Dash to Dock\n"
+"Project-Id-Version: Floating Dock\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-16 13:48+0200\n"
"PO-Revision-Date: 2020-05-16 13:54+0200\n"
@@ -71,8 +71,8 @@ msgstr "Ukončit %d oken"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1134
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "%s Dash to Docku"
+msgid "Floating Dock %s"
+msgstr "%s Floating Docku"
#: locations.js:65
msgid "Trash"
diff --git a/po/de.po b/po/de.po
index 65f840f02..6c3f08620 100644
--- a/po/de.po
+++ b/po/de.po
@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Dash to Dock\n"
+"Project-Id-Version: Floating Dock\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-04 12:35+0100\n"
"PO-Revision-Date: 2017-12-11 19:21+0100\n"
diff --git a/po/el.po b/po/el.po
index 88285213f..7012051ee 100644
--- a/po/el.po
+++ b/po/el.po
@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Dash to Dock\n"
+"Project-Id-Version: Floating Dock\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-04 12:35+0100\n"
"PO-Revision-Date: 2017-09-29 21:48+0300\n"
diff --git a/po/es.po b/po/es.po
index 0bdfaa675..4cba501f7 100644
--- a/po/es.po
+++ b/po/es.po
@@ -1,5 +1,5 @@
-# Dash to Dock spanish translation.
-# This file is distributed under the same license as the Dash to Dock package.
+# Floating Dock spanish translation.
+# This file is distributed under the same license as the Floating Dock package.
# Hugo Olabera , 2015.
#
msgid ""
@@ -61,8 +61,8 @@ msgstr "Todas las ventanas"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1092
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "%s • Dash to Dock"
+msgid "Floating Dock %s"
+msgstr "%s • Floating Dock"
#: Settings.ui.h:1
msgid ""
diff --git a/po/eu.po b/po/eu.po
index fa780b1bf..ab1ed3e18 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -1,5 +1,5 @@
-# Dash to Dock Basque translation.
-# This file is distributed under the same license as the Dash to Dock package.
+# Floating Dock Basque translation.
+# This file is distributed under the same license as the Floating Dock package.
# Ibai Oihanguren Sala , 2020.
#
msgid ""
@@ -63,8 +63,8 @@ msgstr "Leiho guztiak"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1119
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "Dash to Dock %s"
+msgid "Floating Dock %s"
+msgstr "Floating Dock %s"
#: locations.js:65
msgid "Trash"
diff --git a/po/fr.po b/po/fr.po
index c5a13e8a9..f43477694 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Dash to Dock\n"
+"Project-Id-Version: Floating Dock\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-12-07 16:40+0900\n"
"PO-Revision-Date: 2019-12-07 16:52+0900\n"
@@ -65,8 +65,8 @@ msgstr "Toutes les fenêtres"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1127
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "Dash to Dock %s"
+msgid "Floating Dock %s"
+msgstr "Floating Dock %s"
#: Settings.ui.h:1
msgid ""
diff --git a/po/gl.po b/po/gl.po
index 15f8122fe..494a3b6e5 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -1,5 +1,5 @@
-# Dash to Dock galician translation.
-# This file is distributed under the same license as the Dash to Dock package.
+# Floating Dock galician translation.
+# This file is distributed under the same license as the Floating Dock package.
# Xosé M. Lamas , 2018.
#
msgid ""
diff --git a/po/it.po b/po/it.po
index 2806ad5fd..c7a00739e 100644
--- a/po/it.po
+++ b/po/it.po
@@ -65,8 +65,8 @@ msgstr "Tutte le finestre"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1091
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "%s di «Dash to Dock»"
+msgid "Floating Dock %s"
+msgstr "%s di «Floating Dock»"
#: Settings.ui.h:1
msgid ""
diff --git a/po/ja.po b/po/ja.po
index 37cf8dd7c..5bbe9670f 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -1,4 +1,4 @@
-# Dash to Dock master ja.po
+# Floating Dock master ja.po
# Copyright (C) 2013-2017, 2019-2020 THE dash-to-dock'S COPYRIGHT HOLDER
# This file is distributed under the same license as the dash-to-dock package.
# Jiro Matsuzawa , 2013.
@@ -59,8 +59,8 @@ msgstr "%d 個のウィンドウを終了"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1134
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "Dash to Dock の%s"
+msgid "Floating Dock %s"
+msgstr "Floating Dock の%s"
#: appIcons.js:1134
msgid "Settings"
diff --git a/po/nb.po b/po/nb.po
index 77a0f0db4..eb1edaf64 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -1,4 +1,4 @@
-# Norwegian Bokmål translation for Dash to Dock.
+# Norwegian Bokmål translation for Floating Dock.
# Copyright (C) 2018 Michele
# This file is distributed under the same license as the dash-to-dock package.
# Harald H. , 2018.
@@ -67,8 +67,8 @@ msgstr "Alle vinduer"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1069
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "Dash to Dock %s"
+msgid "Floating Dock %s"
+msgstr "Floating Dock %s"
#: Settings.ui.h:1
msgid ""
diff --git a/po/nl.po b/po/nl.po
index ea742c740..dc9147222 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -8,7 +8,7 @@
# Heimen Stoffels , 2015, 2019.
msgid ""
msgstr ""
-"Project-Id-Version: Dash to Dock\n"
+"Project-Id-Version: Floating Dock\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-10 20:27+0200\n"
"PO-Revision-Date: 2019-10-10 20:46+0200\n"
@@ -70,8 +70,8 @@ msgstr "Alle vensters"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1126
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "Dash to Dock %s"
+msgid "Floating Dock %s"
+msgstr "Floating Dock %s"
#: Settings.ui.h:1
msgid ""
diff --git a/po/pl.po b/po/pl.po
index b45c00a01..acbf4a15e 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -70,8 +70,8 @@ msgstr "Wszystkie okna"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1126
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "%s Dash to Dock"
+msgid "Floating Dock %s"
+msgstr "%s Floating Dock"
#: locations.js:65
msgid "Trash"
diff --git a/po/pt.po b/po/pt.po
index d65da5f1c..d2a0bf406 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Dash to Dock\n"
+"Project-Id-Version: Floating Dock\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-06 01:57-0600\n"
"PO-Revision-Date: 2019-03-06 03:55-0600\n"
@@ -66,8 +66,8 @@ msgstr "Todas as janelas"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1092
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "%s do Dash to Dock"
+msgid "Floating Dock %s"
+msgstr "%s do Floating Dock"
#: Settings.ui.h:1
msgid ""
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 6cb10a33e..3d0635881 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -6,7 +6,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Dash to Dock\n"
+"Project-Id-Version: Floating Dock\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-03-06 01:57-0600\n"
"PO-Revision-Date: 2019-03-06 03:56-0600\n"
@@ -67,8 +67,8 @@ msgstr "Todas as janelas"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1092
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "%s do Dash to Dock"
+msgid "Floating Dock %s"
+msgstr "%s do Floating Dock"
#: Settings.ui.h:1
msgid ""
diff --git a/po/ru.po b/po/ru.po
index b41fa0c0f..2901b7dbc 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -65,7 +65,7 @@ msgstr "Все окна"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1127
#, javascript-format
-msgid "Dash to Dock %s"
+msgid "Floating Dock %s"
msgstr ""
#: Settings.ui.h:1
diff --git a/po/sr.po b/po/sr.po
index af9ff5339..3c19baa13 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -63,7 +63,7 @@ msgstr "Сви прозори"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1450
#, javascript-format
-msgid "Dash to Dock %s"
+msgid "Floating Dock %s"
msgstr "%s плоче/панела"
#: Settings.ui.h:1
diff --git a/po/sr@latin.po b/po/sr@latin.po
index e7f7794fa..ae9604406 100644
--- a/po/sr@latin.po
+++ b/po/sr@latin.po
@@ -63,7 +63,7 @@ msgstr "Svi prozori"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1450
#, javascript-format
-msgid "Dash to Dock %s"
+msgid "Floating Dock %s"
msgstr "%s ploče/panela"
#: Settings.ui.h:1
diff --git a/po/sv.po b/po/sv.po
index dd5b4bdbb..5e87485e3 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -71,8 +71,8 @@ msgstr "Stäng %d fönster"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1134
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "%s för Dash to Dock"
+msgid "Floating Dock %s"
+msgstr "%s för Floating Dock"
#: locations.js:80
msgid "Trash"
diff --git a/po/tr.po b/po/tr.po
index e4bf8a8b8..48166a33e 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -74,8 +74,8 @@ msgstr "Tüm Pencereler"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1126
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "Dash to Dock %sı"
+msgid "Floating Dock %s"
+msgstr "Floating Dock %sı"
#: Settings.ui.h:1
msgid "When set to minimize, double clicking minimizes all the windows of the application."
diff --git a/po/uk_UA.po b/po/uk_UA.po
index 3252304c3..df289a23b 100644
--- a/po/uk_UA.po
+++ b/po/uk_UA.po
@@ -60,7 +60,7 @@ msgstr "Усі вікна"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1429
#, javascript-format
-msgid "Dash to Dock %s"
+msgid "Floating Dock %s"
msgstr ""
#: Settings.ui.h:1
diff --git a/po/zh_CN.po b/po/zh_CN.po
index cae290f73..8bd2fd2cd 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -7,7 +7,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Dash to Dock\n"
+"Project-Id-Version: Floating Dock\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-23 15:33+0800\n"
"PO-Revision-Date: 2017-08-03 22:49+0800\n"
@@ -68,8 +68,8 @@ msgstr "所有窗口"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1125
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "Dash to Dock %s"
+msgid "Floating Dock %s"
+msgstr "Floating Dock %s"
#: locations.js:65
msgid "Trash"
diff --git a/po/zh_TW.po b/po/zh_TW.po
index 84cb252a0..91b738da7 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -5,7 +5,7 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: Dash to Dock\n"
+"Project-Id-Version: Floating Dock\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-23 23:49+0800\n"
"PO-Revision-Date: 2020-05-24 00:08+0800\n"
@@ -71,8 +71,8 @@ msgstr "結束 %d 個視窗"
#. can also translate the full message if this fits better your language.
#: appIcons.js:1134
#, javascript-format
-msgid "Dash to Dock %s"
-msgstr "Dash to Dock %s"
+msgid "Floating Dock %s"
+msgstr "Floating Dock %s"
#: locations.js:65
msgid "Trash"
diff --git a/prefs.js b/prefs.js
index 532eef419..6efabdf4e 100644
--- a/prefs.js
+++ b/prefs.js
@@ -214,6 +214,9 @@ var Settings = GObject.registerClass({
this._dock_size_timeout = 0;
this._icon_size_timeout = 0;
this._opacity_timeout = 0;
+ this._border_radius_timeout = 0;
+ this._floating_margin_timeout = 0;
+
this._monitorsConfig = new MonitorsConfig();
this._bindSettings();
@@ -237,6 +240,46 @@ var Settings = GObject.registerClass({
this._settings.set_int('preferred-monitor', preferredMonitor);
}
+ // custom_radius_scale_format_value_cb(scale, value) {
+ // return value + ' px'
+ // }
+
+ // custom_margin_scale_format_value_cb(scale, value) {
+ // return value + ' px';
+ // }
+
+ custom_radius_scale_value_changed_cb(scale) {
+ // Avoid settings the size consinuosly
+ if (this._border_radius_timeout > 0)
+ GLib.source_remove(this._border_radius_timeout);
+
+ this._border_radius_timeout = GLib.timeout_add(
+ GLib.PRIORITY_DEFAULT, SCALE_UPDATE_TIMEOUT, () => {
+ this._settings.set_int('border-radius', scale.get_value());
+ this._border_radius_timeout = 0;
+ return GLib.SOURCE_REMOVE;
+ });
+ }
+
+ custom_margin_scale_value_changed_cb(scale) {
+ // Avoid settings the size consinuosly
+ if (this._floating_margin_timeout > 0)
+ GLib.source_remove(this._floating_margin_timeout);
+
+ this._floating_margin_timeout = GLib.timeout_add(
+ GLib.PRIORITY_DEFAULT, SCALE_UPDATE_TIMEOUT, () => {
+ this._settings.set_int('floating-margin', scale.get_value());
+ this._floating_margin_timeout = 0;
+ return GLib.SOURCE_REMOVE;
+ });
+ }
+
+ custom_opacity_scale_value_changed_cb(scale) {
+ // Avoid settings the opacity consinuosly as it's change is animated
+ if (this._opacity_timeout > 0)
+ GLib.source_remove(this._opacity_timeout);
+ }
+
position_top_button_toggled_cb(button) {
if (button.get_active())
this._settings.set_enum('dock-position', 0);
@@ -275,6 +318,34 @@ var Settings = GObject.registerClass({
});
}
+ custom_opacity_scale_format_value_cb(scale, value) {
+ return Math.round(value * 100) + ' %';
+ }
+
+
+ min_opacity_scale_format_value_cb(scale, value) {
+ return Math.round(value * 100) + ' %';
+ }
+
+ max_opacity_scale_format_value_cb(scale, value) {
+ return Math.round(value * 100) + ' %';
+ }
+
+ all_windows_radio_button_toggled_cb(button) {
+ if (button.get_active())
+ this._settings.set_enum('intellihide-mode', 0);
+ }
+
+ focus_application_windows_radio_button_toggled_cb(button) {
+ if (button.get_active())
+ this._settings.set_enum('intellihide-mode', 1);
+ }
+
+ maximized_windows_radio_button_toggled_cb(button) {
+ if (button.get_active())
+ this._settings.set_enum('intellihide-mode', 2);
+ }
+
icon_size_scale_value_changed_cb(scale) {
// Avoid settings the size consinuosly
if (this._icon_size_timeout > 0)
@@ -526,6 +597,18 @@ var Settings = GObject.registerClass({
});
+ // Custom Margin Formatter
+ const custom_margin_scale = this._builder.get_object('custom_margin_scale');
+ custom_margin_scale.set_format_value_func((_, value) => {
+ return value + ' px';
+ });
+
+ // Custom Border Formatter
+ const custom_radius_scale = this._builder.get_object('custom_radius_scale');
+ custom_radius_scale.set_format_value_func((_, value) => {
+ return value + ' px';
+ });
+
// size options
const dock_size_scale = this._builder.get_object('dock_size_scale');
dock_size_scale.set_value(this._settings.get_double('height-fraction'));
@@ -544,6 +627,8 @@ var Settings = GObject.registerClass({
});
this._builder.get_object('preview_size_scale').set_value(this._settings.get_double('preview-size-scale'));
+ this._builder.get_object('')
+
// Corrent for rtl languages
if (this._rtl) {
// Flip value position: this is not done automatically
@@ -899,6 +984,12 @@ var Settings = GObject.registerClass({
}
);
+
+ this._builder.get_object('custom_radius_scale').set_value(this._settings.get_int('border-radius'));
+
+ this._builder.get_object('custom_margin_scale').set_value(this._settings.get_int('floating-margin'));
+
+
const custom_opacity_scale = this._builder.get_object('custom_opacity_scale');
custom_opacity_scale.set_value(this._settings.get_double('background-opacity'));
custom_opacity_scale.set_format_value_func((_, value) => {
@@ -928,6 +1019,7 @@ var Settings = GObject.registerClass({
}
});
+
// Create dialog for transparency advanced settings
this._builder.get_object('dynamic_opacity_button').connect('clicked', () => {
@@ -991,10 +1083,7 @@ var Settings = GObject.registerClass({
this._builder.get_object('unity_backlit_items_switch'),
'active', Gio.SettingsBindFlags.DEFAULT
);
-
- this._settings.bind('force-straight-corner',
- this._builder.get_object('force_straight_corner_switch'),
- 'active', Gio.SettingsBindFlags.DEFAULT);
+
// About Panel
diff --git a/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml b/schemas/org.gnome.shell.extensions.floating-dock.gschema.xml
similarity index 98%
rename from schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml
rename to schemas/org.gnome.shell.extensions.floating-dock.gschema.xml
index 75099ba01..eaefef89e 100644
--- a/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml
+++ b/schemas/org.gnome.shell.extensions.floating-dock.gschema.xml
@@ -156,6 +156,18 @@
Maximum dash icon sizeSet the allowed maximum dash icon size. Allowed range: 16..64.
+
+
+ 30
+ Dock border radius
+ Set floating dock border radius.
+
+
+ 4
+ Dash floating distance from the edge
+ Set floating dock margin.
+
+
0Preview size scale
@@ -552,11 +564,6 @@
Keybinding to either show or launch the 10th application in the dash.
-
- false
- Force straight corners in dash
- Make the borders in the dash non rounded
- falseEnable unity7 like glossy backlit items
diff --git a/theming.js b/theming.js
index eba037099..46e347672 100644
--- a/theming.js
+++ b/theming.js
@@ -49,6 +49,11 @@ var ThemeManager = class DashToDock_ThemeManager {
this._customizedBorder = {red: 0, green: 0, blue: 0, alpha: 0};
this._transparency = new Transparency(dock);
+ this._border_radius = 100;
+ this._floating_margin = 4;
+
+ this._dock_position = 3
+
this._signalsHandler.add([
// When theme changes re-obtain default background color
St.ThemeContext.get_for_stage (global.stage),
@@ -161,27 +166,27 @@ var ThemeManager = class DashToDock_ThemeManager {
// if not the opacity will always be overridden by the color below.
// Note that if using 'dynamic' transparency modes,
// the opacity will be set by the opaque/transparent styles anyway.
- let newAlpha = Math.round(backgroundColor.alpha/2.55)/100;
-
- backgroundColor = settings.get_string('background-color');
- // backgroundColor is a string like rgb(0,0,0)
- const [ret, color] = Clutter.Color.from_string(backgroundColor);
- if (!ret) {
- logError(new Error(`${backgroundColor} is not a valid color string`));
- return;
- }
+ let newAlpha = 155;
if (settings.get_enum('transparency-mode') == TransparencyMode.FIXED) {
newAlpha = settings.get_double('background-opacity');
- this._customizedBackground =
- `rgba(${color.red}, ${color.blue}, ${color.green}, ${newAlpha})`;
} else {
- this._customizedBackground = backgroundColor;
+ newAlpha = Math.round(backgroundColor.alpha/2.55)/100;
}
+ backgroundColor = settings.get_string('background-color');
+ this._customizedBackground = backgroundColor;
this._customizedBorder = this._customizedBackground;
+ // backgroundColor is a string like rgb(0,0,0)
+ const [ret, color] = Clutter.Color.from_string(backgroundColor);
+ if (!ret) {
+ logError(new Error(`${backgroundColor} is not a valid color string`));
+ return;
+ }
+
color.alpha = newAlpha * 255;
+
this._transparency.setColor(color);
} else {
// backgroundColor is a Clutter.Color object
@@ -206,16 +211,6 @@ var ThemeManager = class DashToDock_ThemeManager {
this._actor.add_style_class_name('running-dots');
else
this._actor.remove_style_class_name('running-dots');
-
- // If not the built-in theme option is not selected
- if (!settings.get_boolean('apply-custom-theme')) {
- if (settings.get_boolean('force-straight-corner'))
- this._actor.add_style_class_name('straight-corner');
- else
- this._actor.remove_style_class_name('straight-corner');
- } else {
- this._actor.remove_style_class_name('straight-corner');
- }
}
updateCustomTheme() {
@@ -243,65 +238,70 @@ var ThemeManager = class DashToDock_ThemeManager {
this._dash._background.set_style(null);
this._transparency.disable();
- // If built-in theme is enabled do nothing else
- if (settings.get_boolean('apply-custom-theme'))
- return;
-
- let newStyle = '';
- let position = Utils.getPosition(settings);
+ let newStyle = "";
- // obtain theme border settings
- let themeNode = this._dash._background.get_theme_node();
- let borderColor = themeNode.get_border_color(St.Side.TOP);
- let borderWidth = themeNode.get_border_width(St.Side.TOP);
+ this._border_radius = settings.get_int('border-radius');
+ this._floating_margin = settings.get_int('floating-margin');
+ this._dock_position = settings.get_enum('dock-position')
+
- // We're copying border and corner styles to left border and top-left
- // corner, also removing bottom border and bottom-right corner styles
- let borderInner = '';
- let borderMissingStyle = '';
+ let position_keys = [
+ "top",
+ "right",
+ "bottom",
+ "left"
+ ]
+
+ let pos_string = position_keys[this._dock_position];
- if (this._rtl && (position != St.Side.RIGHT))
- borderMissingStyle = 'border-right: ' + borderWidth + 'px solid ' +
- borderColor.to_string() + ';';
- else if (!this._rtl && (position != St.Side.LEFT))
- borderMissingStyle = 'border-left: ' + borderWidth + 'px solid ' +
- borderColor.to_string() + ';';
+ newStyle = newStyle + `border-radius: ${this._border_radius}px;`;
+ this._dash._background.set_style(newStyle);
- newStyle = borderMissingStyle;
+ let marginStyle = `margin-${pos_string}: ${this._floating_margin}px;`;
+ this._dash.set_style(marginStyle);
- if (newStyle) {
- // I do call set_style possibly twice so that only the background gets the transition.
- // The transition-property css rules seems to be unsupported
- this._dash._background.set_style(newStyle);
- }
- // Customize background
let fixedTransparency = settings.get_enum('transparency-mode') == TransparencyMode.FIXED;
let defaultTransparency = settings.get_enum('transparency-mode') == TransparencyMode.DEFAULT;
+
if (!defaultTransparency && !fixedTransparency) {
this._transparency.enable();
- }
- else if (!defaultTransparency || settings.get_boolean('custom-background-color')) {
- newStyle = newStyle + 'background-color:'+ this._customizedBackground + '; ' +
- 'border-color:'+ this._customizedBorder + '; ' +
- 'transition-delay: 0s; transition-duration: 0.250s;';
+ } else {
+ let custom_opacity = settings.get_double('background-opacity');
+ let use_custom_background = settings.get_boolean('custom-background-color');
+ let background_color = "";
+
+ if(use_custom_background) {
+ const [ret, color] = Clutter.Color.from_string(settings.get_string('background-color'));
+ background_color = `rgba(${color.red}, ${color.green}, ${color.blue}, ${custom_opacity})`;
+ } else {
+ let themenode = this._dash._background.get_theme_node();
+ let themeColor = themenode.get_background_color();
+
+ background_color = `rgba(${themeColor.red}, ${themeColor.green}, ${themeColor.blue}, ${custom_opacity})`;
+ }
+
+ newStyle = newStyle + `background-color: ${background_color}; transition-delay: 0s; transition-duration: 0.250s;`;
this._dash._background.set_style(newStyle);
}
}
_bindSettingsChanges() {
- let keys = ['transparency-mode',
- 'customize-alphas',
- 'min-alpha',
- 'max-alpha',
- 'background-opacity',
- 'custom-background-color',
- 'background-color',
- 'apply-custom-theme',
- 'custom-theme-shrink',
- 'custom-theme-running-dots',
- 'extend-height',
- 'force-straight-corner'];
+ let keys = [
+ 'transparency-mode',
+ 'customize-alphas',
+ 'min-alpha',
+ 'max-alpha',
+ 'background-opacity',
+ 'custom-background-color',
+ 'background-color',
+ 'apply-custom-theme',
+ 'custom-theme-shrink',
+ 'custom-theme-running-dots',
+ 'extend-height',
+ 'border-radius',
+ 'floating-margin'
+ ];
this._signalsHandler.add(...keys.map(key => [
Docking.DockManager.settings,