From c802a62f340afe17765dbb54e3c8198f4687d1b7 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Tue, 5 Apr 2022 22:54:42 +0200 Subject: [PATCH 01/62] convert behavior tab to adw preferences page --- SettingsBehavior.ui | 189 ++++++++++++++++++++++++++++++++++++++++++++ prefs.js | 50 ++++++++---- 2 files changed, 225 insertions(+), 14 deletions(-) create mode 100644 SettingsBehavior.ui diff --git a/SettingsBehavior.ui b/SettingsBehavior.ui new file mode 100644 index 00000000..39c663a7 --- /dev/null +++ b/SettingsBehavior.ui @@ -0,0 +1,189 @@ + + + + + + + + + Applications + + + + Show favorite applications + + + center + + + + + + + + Show running applications + + + center + + + + + + + + Show favorite applications on secondary panels + + + center + + + + + + + + Show favorite applications + Top Bar > Show App Menu must be enabled in Tweak Tool + + + center + + + + + + + + Ungroup applications + + + True + center + + + emblem-system-symbolic + + + + + + + + center + + + + + + + + + + + + Hover + + + + Show window previews on hover + + + True + center + + + emblem-system-symbolic + + + + + + + + center + + + + + + + + Show tooltip on hover + + + center + + + + + + + + + + + + Isolate + + + + Isolate Workspaces + + + center + + + + + + + + Isolate monitors + + + center + + + + + + + + + + + + Overview + + + + Click empty space to close overview + + + center + + + + + + + + Disable show overview on startup + + + center + + + + + + + + + + \ No newline at end of file diff --git a/prefs.js b/prefs.js index a250a4f5..aca185bc 100644 --- a/prefs.js +++ b/prefs.js @@ -25,6 +25,7 @@ const Gio = imports.gi.Gio; const GLib = imports.gi.GLib; const GObject = imports.gi.GObject; const Gtk = imports.gi.Gtk; +const Adw = imports.gi.Adw; const Gdk = imports.gi.Gdk; const Mainloop = imports.mainloop; @@ -2460,20 +2461,41 @@ function init() { function fillPreferencesWindow(window) { window.set_default_size(680, 740); - - let preferences = new Preferences(); - let box = new Gtk.Box({orientation: Gtk.Orientation.VERTICAL}); - - // dummy page to prevent 'Extension did not provide any UI' - // error until we migrate to Adw - let dummyPage = new imports.gi.Adw.PreferencesPage() - - box.append(new imports.gi.Adw.HeaderBar); - window.add(dummyPage); - window.visible_page = dummyPage - - box.append(preferences.notebook); - window.set_content(box); + + let pagePosition = new Adw.PreferencesPage(); + pagePosition.set_title("Position"); + pagePosition.set_icon_name("document-properties"); + window.add(pagePosition); + + let pageStyle = new Adw.PreferencesPage(); + pageStyle.set_title("Style"); + pageStyle.set_icon_name("document-properties"); + window.add(pageStyle); + + builder = new Gtk.Builder(); + builder.set_scope(new BuilderScope()); + builder.set_translation_domain(Me.metadata['gettext-domain']); + builder.add_from_file(Me.path + '/SettingsBehavior.ui'); + let pageBehavior = builder.get_object('behavior'); + + pageBehavior.set_title("Behavior"); + pageBehavior.set_icon_name("document-properties"); + window.add(pageBehavior); + + let pageAction = new Adw.PreferencesPage(); + pageAction.set_title("Action"); + pageAction.set_icon_name("document-properties"); + window.add(pageAction); + + let pageFineTune = new Adw.PreferencesPage(); + pageFineTune.set_title("Fine-Tune"); + pageFineTune.set_icon_name("document-properties"); + window.add(pageFineTune); + + let pageAbout = new Adw.PreferencesPage(); + pageAbout.set_title("About"); + pageAbout.set_icon_name("document-properties"); + window.add(pageAbout); } function buildPrefsWidget() { From 294bea9236aac9169caad5902ba721234d1403b3 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 00:46:48 +0200 Subject: [PATCH 02/62] convert style tab to adw preferences page --- SettingsBehavior.ui | 14 +- SettingsStyle.ui | 353 ++++++++++++++++++++++++++++++++++++++++++++ prefs.js | 17 +-- 3 files changed, 368 insertions(+), 16 deletions(-) create mode 100644 SettingsStyle.ui diff --git a/SettingsBehavior.ui b/SettingsBehavior.ui index 39c663a7..d5dbf951 100644 --- a/SettingsBehavior.ui +++ b/SettingsBehavior.ui @@ -2,15 +2,17 @@ + Behavior + document-properties - Applications + Applications - Show favorite applications + Show favorite applications center @@ -21,7 +23,7 @@ - Show running applications + Show running applications center @@ -32,7 +34,7 @@ - Show favorite applications on secondary panels + Show favorite applications on secondary panels center @@ -128,7 +130,7 @@ - Isolate + Isolate @@ -158,7 +160,7 @@ - Overview + Overview diff --git a/SettingsStyle.ui b/SettingsStyle.ui new file mode 100644 index 00000000..5a27e3f4 --- /dev/null +++ b/SettingsStyle.ui @@ -0,0 +1,353 @@ + + + + + + 0.33 + 1 + 0.01 + 0.1 + + + + 0.33 + 1 + 0.01 + 0.1 + + + + 100 + 5 + 10 + + + + 100 + 5 + 10 + + + + 100 + 5 + 10 + + + + Style + document-properties + + + + + AppIcon style + + + + App Icon Margin + (default is 8) + + + baseline + True + appicon_margin_adjustment + 0 + 0 + right + True + + + + + + + + + App Icon Padding + (default is 4) + + + baseline + True + appicon_padding_adjustment + 0 + 0 + right + True + + + 0 + 1 + + + + + + + + + Animate hovering app icons + + + True + center + + + False + emblem-system-symbolic + + + + + + + + center + + + + + + + + + + + + Running indicator + + + + Running indicator position + + + Bottom + center + + + + + + Top + center + dots_bottom_button + + + + + + Left + center + dots_bottom_button + + + + + + Right + center + dots_bottom_button + + + + + + + + + Running indicator style (Focused app) + + + center + + + emblem-system-symbolic + + + + + + + + center + + Dots + Squares + Dashes + Segmented + Solid + Ciliora + Metro + + + + + + + + + Running indicator style (Unfocused apps) + + + center + + Dots + Squares + Dashes + Segmented + Solid + Ciliora + Metro + + + + + + + + + + + + + Panel style + + + + Override panel theme background color + + + center + + + + + center + + + + + + + + + + + + + + Override panel theme background opacity + + + center + + + + + + + + Panel background opacity (%) + + + center + 0 + trans_opacity_adjustment + + + + + + + + Dynamic background opacity + Change opacity when a window gets close to the panel + + + True + center + + + False + emblem-system-symbolic + + + + + + + + center + + + + + + + + + + + + + + + Override panel theme gradient + + + center + + + + + + + + Gradient top color and opacity (%) + + + True + center + + + + + center + 0 + trans_gradient_opacity1_adjustment + + + + + + + + Gradient bottom color and opacity (%) + + + True + center + + + + + center + 0 + trans_gradient_opacity2_adjustment + + + + + + + + + + \ No newline at end of file diff --git a/prefs.js b/prefs.js index aca185bc..df95ccbb 100644 --- a/prefs.js +++ b/prefs.js @@ -2461,25 +2461,22 @@ function init() { function fillPreferencesWindow(window) { window.set_default_size(680, 740); - + + builder = new Gtk.Builder(); + builder.set_scope(new BuilderScope()); + builder.set_translation_domain(Me.metadata['gettext-domain']); + let pagePosition = new Adw.PreferencesPage(); pagePosition.set_title("Position"); pagePosition.set_icon_name("document-properties"); window.add(pagePosition); - let pageStyle = new Adw.PreferencesPage(); - pageStyle.set_title("Style"); - pageStyle.set_icon_name("document-properties"); + builder.add_from_file(Me.path + '/SettingsStyle.ui'); + let pageStyle = builder.get_object('style'); window.add(pageStyle); - builder = new Gtk.Builder(); - builder.set_scope(new BuilderScope()); - builder.set_translation_domain(Me.metadata['gettext-domain']); builder.add_from_file(Me.path + '/SettingsBehavior.ui'); let pageBehavior = builder.get_object('behavior'); - - pageBehavior.set_title("Behavior"); - pageBehavior.set_icon_name("document-properties"); window.add(pageBehavior); let pageAction = new Adw.PreferencesPage(); From 35412af21613c3175f38cb9f7a794e0bddb70fba Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 01:10:33 +0200 Subject: [PATCH 03/62] convert action tab to adw preferences page --- SettingsAction.ui | 172 ++++++++++++++++++++++++++++++++++++++++++++++ prefs.js | 5 +- 2 files changed, 174 insertions(+), 3 deletions(-) create mode 100644 SettingsAction.ui diff --git a/SettingsAction.ui b/SettingsAction.ui new file mode 100644 index 00000000..3b2ec4c6 --- /dev/null +++ b/SettingsAction.ui @@ -0,0 +1,172 @@ + + + + + + Action + document-properties + + + + + Click action + + + + Click action + Behaviour when clicking on the icon of a running application. + + + True + center + + + False + emblem-system-symbolic + + + + + + + + False + center + + Cycle windows + minimize + Cycle through windows + Toggle single / Preview multiple + Toggle windows + Raise windows + Launch new instance + + + + + + + + + + + + + Scroll action + + + + Scroll panel action + Behavior when mouse scrolling over the panel. + + + True + True + True + end + center + + + True + False + emblem-system-symbolic + + + + + + + + True + False + center + True + + Do nothing + Switch workspace + Cycle windows + Change volume + + + + + + + + + Scroll icon action + Behavior when mouse scrolling over an application icon. + + + True + center + + + True + False + emblem-system-symbolic + + + + + + + + False + center + True + + Do nothing + Cycle windows + Same as panel + + + + + + + + + + + + + Hotkey overlay + + + + Use hotkeys to activate apps + Enable Super+(0-9) as shortcuts to activate apps. It can also be used together with Shift and Ctrl. + + + True + center + + + False + emblem-system-symbolic + + + + + + + + center + + + + + + + + + + \ No newline at end of file diff --git a/prefs.js b/prefs.js index df95ccbb..8f3e963f 100644 --- a/prefs.js +++ b/prefs.js @@ -2479,9 +2479,8 @@ function fillPreferencesWindow(window) { let pageBehavior = builder.get_object('behavior'); window.add(pageBehavior); - let pageAction = new Adw.PreferencesPage(); - pageAction.set_title("Action"); - pageAction.set_icon_name("document-properties"); + builder.add_from_file(Me.path + '/SettingsAction.ui'); + let pageAction = builder.get_object('action'); window.add(pageAction); let pageFineTune = new Adw.PreferencesPage(); From e1459fbe570658283e2bd7650fe125be29c1ba4f Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 01:41:46 +0200 Subject: [PATCH 04/62] convert about tab to adw preferences page --- SettingsAbout.ui | 99 ++++++++++++++++++++++++++++++++++++++++++++++++ prefs.js | 5 +-- 2 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 SettingsAbout.ui diff --git a/SettingsAbout.ui b/SettingsAbout.ui new file mode 100644 index 00000000..73c23bdb --- /dev/null +++ b/SettingsAbout.ui @@ -0,0 +1,99 @@ + + + + + + About + document-properties + + + + + Info + + + + Version + + + ... + + + + + + + + Source + + + GitHub + True + center + https://github.com/jderose9/dash-to-panel + + + + + + + + + + + + Export and Import + + + + Export and import settings + Use the buttons below to create a settings file from your current preferences that can be imported on a different machine. + + + + + + + + 8 + 8 + 4 + 4 + 8 + end + + + Export to file + True + + + + + Import from file + True + + + + + + + + + + + + + + + + <span size="small">This program comes with ABSOLUTELY NO WARRANTY. See the <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, version 2 or later</a> for details.</span> + True + center + True + + + + + + + \ No newline at end of file diff --git a/prefs.js b/prefs.js index 8f3e963f..8e5b5ab0 100644 --- a/prefs.js +++ b/prefs.js @@ -2488,9 +2488,8 @@ function fillPreferencesWindow(window) { pageFineTune.set_icon_name("document-properties"); window.add(pageFineTune); - let pageAbout = new Adw.PreferencesPage(); - pageAbout.set_title("About"); - pageAbout.set_icon_name("document-properties"); + builder.add_from_file(Me.path + '/SettingsAbout.ui'); + let pageAbout = builder.get_object('about'); window.add(pageAbout); } From ff5fc34106e02a8f9d3f23c34cbf58ccf36ea573 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 19:11:44 +0200 Subject: [PATCH 05/62] convert position tab to adw preferences page --- SettingsPosition.ui | 247 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 247 insertions(+) create mode 100644 SettingsPosition.ui diff --git a/SettingsPosition.ui b/SettingsPosition.ui new file mode 100644 index 00000000..5fd631ef --- /dev/null +++ b/SettingsPosition.ui @@ -0,0 +1,247 @@ + + + + + + 0.33 + 1 + 0.01 + 0.1 + + + + 100 + 1 + 10 + + + + Position + document-properties + + + + + Panel + + + + Display the main panel on + + + center + + + + + + + + Display panels on all monitors + + + False + center + + + + + + + + + + + + + Panel Intellihide + Hide and reveal the panel according to preferences + + + True + center + + + False + emblem-system-symbolic + + + + + + + + center + + + + + + + + + + + + Order and Position on monitors + + + + + Monitor + + + 6 + 6 + 6 + 6 + + + Apply changes to all monitors + False + start + True + + + + + False + end + center + True + + + + + + + + + + + + + + + + + Panel screen position + + + Bottom + False + center + True + + + + + + Top + False + center + position_bottom_button + + + + + + Left + False + center + position_bottom_button + + + + + + Right + False + center + position_bottom_button + + + + + + + + + Panel thickness + (default is 48) + + + True + panel_size_adjustment + 0 + 0 + right + True + + + + + + + + + Panel length (%) + (default is 100) + + + True + panel_length_adjustment + 0 + 0 + right + True + + + + + + + + Anchor + + + False + center + + Start + Middle + End + + + + + + + + + + + + + + + + Taskbar Display + + + True + False + 6 + none + + + + + + + + + + \ No newline at end of file From b347d275ced30f403e93d09df4fa3db154db9d97 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 19:12:04 +0200 Subject: [PATCH 06/62] convert fine-tune tab to adw preferences page --- SettingsFineTune.ui | 273 ++++++++++++++++++++++++++++++++++++++++++++ prefs.js | 10 +- 2 files changed, 277 insertions(+), 6 deletions(-) create mode 100644 SettingsFineTune.ui diff --git a/SettingsFineTune.ui b/SettingsFineTune.ui new file mode 100644 index 00000000..1b7ed5ed --- /dev/null +++ b/SettingsFineTune.ui @@ -0,0 +1,273 @@ + + + + + + 0.33 + 1 + 0.01 + 0.1 + + + + 0.33 + 1 + 0.01 + 0.1 + + + + 0.33 + 1 + 0.01 + 0.1 + + + + 0.33 + 1 + 0.01 + 0.1 + + + + 0.33 + 1 + 0.01 + 0.1 + + + + Fine-Tune + document-properties + + + + + Font size + + + + Tray Font Size + (0 = theme default) + + + True + True + baseline + True + tray_size_adjustment + 0 + 0 + right + True + + + + + + + + + LeftBox Font Size + (0 = theme default) + + + True + True + baseline + True + leftbox_size_adjustment + 0 + 0 + right + True + + + + + + + + + + + + + Padding + + + + Tray Item Padding + (-1 = theme default) + + + baseline + True + tray_padding_adjustment + 0 + 0 + right + True + + + + + + + + + Status Icon Padding + (-1 = theme default) + + + baseline + True + statusicon_padding_adjustment + 0 + 0 + right + True + + + + + + + + + LeftBox Padding + (-1 = theme default) + + + baseline + True + leftbox_padding_adjustment + 0 + 0 + right + True + + + + + + + + + + + + + Animate + + + + Animate switching applications + + + center + + + + + + + + Animate launching new windows + + + center + + + + + + + + + + + + Gnome functionality + + + + Keep original gnome-shell dash + (overview) + + + center + + + + + + + + Keep original gnome-shell top panel + + + center + + + + + + + + Activate panel menu buttons on click only + (e.g. date menu) + + + center + + + + + + + + Force Activities hot corner on primary monitor + + + center + + + + + + + + + + + + + + + App icon secondary menu + (right-click menu) + + + True + center + + + False + emblem-system-symbolic + + + + + + + + + + + + + \ No newline at end of file diff --git a/prefs.js b/prefs.js index 8e5b5ab0..13ff1190 100644 --- a/prefs.js +++ b/prefs.js @@ -2466,9 +2466,8 @@ function fillPreferencesWindow(window) { builder.set_scope(new BuilderScope()); builder.set_translation_domain(Me.metadata['gettext-domain']); - let pagePosition = new Adw.PreferencesPage(); - pagePosition.set_title("Position"); - pagePosition.set_icon_name("document-properties"); + builder.add_from_file(Me.path + '/SettingsPosition.ui'); + let pagePosition = builder.get_object('position'); window.add(pagePosition); builder.add_from_file(Me.path + '/SettingsStyle.ui'); @@ -2483,9 +2482,8 @@ function fillPreferencesWindow(window) { let pageAction = builder.get_object('action'); window.add(pageAction); - let pageFineTune = new Adw.PreferencesPage(); - pageFineTune.set_title("Fine-Tune"); - pageFineTune.set_icon_name("document-properties"); + builder.add_from_file(Me.path + '/SettingsFineTune.ui'); + let pageFineTune = builder.get_object('finetune'); window.add(pageFineTune); builder.add_from_file(Me.path + '/SettingsAbout.ui'); From 8e815e63aca3a7147b8553d9146045fe8d2ca9aa Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 19:56:18 +0200 Subject: [PATCH 07/62] move Settings*.ui files into ui folder --- prefs.js | 66 +++++++++++-------- SettingsAbout.ui => ui/SettingsAbout.ui | 0 SettingsAction.ui => ui/SettingsAction.ui | 0 SettingsBehavior.ui => ui/SettingsBehavior.ui | 0 SettingsFineTune.ui => ui/SettingsFineTune.ui | 0 SettingsPosition.ui => ui/SettingsPosition.ui | 0 SettingsStyle.ui => ui/SettingsStyle.ui | 0 7 files changed, 37 insertions(+), 29 deletions(-) rename SettingsAbout.ui => ui/SettingsAbout.ui (100%) rename SettingsAction.ui => ui/SettingsAction.ui (100%) rename SettingsBehavior.ui => ui/SettingsBehavior.ui (100%) rename SettingsFineTune.ui => ui/SettingsFineTune.ui (100%) rename SettingsPosition.ui => ui/SettingsPosition.ui (100%) rename SettingsStyle.ui => ui/SettingsStyle.ui (100%) diff --git a/prefs.js b/prefs.js index 13ff1190..45a5b952 100644 --- a/prefs.js +++ b/prefs.js @@ -164,8 +164,42 @@ const Preferences = class { this._builder = new Gtk.Builder(); this._builder.set_scope(new BuilderScope(this)); this._builder.set_translation_domain(Me.metadata['gettext-domain']); - this._builder.add_from_file(Me.path + '/Settings.ui'); - this.notebook = this._builder.get_object('settings_notebook'); + + if (window) { + this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); + let pagePosition = this._builder.get_object('position'); + window.add(pagePosition); + + this._builder.add_from_file(Me.path + '/ui/SettingsStyle.ui'); + let pageStyle = this._builder.get_object('style'); + window.add(pageStyle); + + this._builder.add_from_file(Me.path + '/ui/SettingsBehavior.ui'); + let pageBehavior = this._builder.get_object('behavior'); + window.add(pageBehavior); + + this._builder.add_from_file(Me.path + '/ui/SettingsAction.ui'); + let pageAction = this._builder.get_object('action'); + window.add(pageAction); + + this._builder.add_from_file(Me.path + '/ui/SettingsFineTune.ui'); + let pageFineTune = this._builder.get_object('finetune'); + window.add(pageFineTune); + + this._builder.add_from_file(Me.path + '/ui/SettingsAbout.ui'); + let pageAbout = this._builder.get_object('about'); + window.add(pageAbout); + + // set the window as notebook, it is being used as parent for dialogs + this.notebook = window; + + // TODO return for now, many things are still missing + return; + + } else { + this._builder.add_from_file(Me.path + '/Settings.ui'); + this.notebook = this._builder.get_object('settings_notebook'); + } // Timeout to delay the update of the settings this._panel_size_timeout = 0; @@ -2462,33 +2496,7 @@ function init() { function fillPreferencesWindow(window) { window.set_default_size(680, 740); - builder = new Gtk.Builder(); - builder.set_scope(new BuilderScope()); - builder.set_translation_domain(Me.metadata['gettext-domain']); - - builder.add_from_file(Me.path + '/SettingsPosition.ui'); - let pagePosition = builder.get_object('position'); - window.add(pagePosition); - - builder.add_from_file(Me.path + '/SettingsStyle.ui'); - let pageStyle = builder.get_object('style'); - window.add(pageStyle); - - builder.add_from_file(Me.path + '/SettingsBehavior.ui'); - let pageBehavior = builder.get_object('behavior'); - window.add(pageBehavior); - - builder.add_from_file(Me.path + '/SettingsAction.ui'); - let pageAction = builder.get_object('action'); - window.add(pageAction); - - builder.add_from_file(Me.path + '/SettingsFineTune.ui'); - let pageFineTune = builder.get_object('finetune'); - window.add(pageFineTune); - - builder.add_from_file(Me.path + '/SettingsAbout.ui'); - let pageAbout = builder.get_object('about'); - window.add(pageAbout); + let preferences = new Preferences(window); } function buildPrefsWidget() { diff --git a/SettingsAbout.ui b/ui/SettingsAbout.ui similarity index 100% rename from SettingsAbout.ui rename to ui/SettingsAbout.ui diff --git a/SettingsAction.ui b/ui/SettingsAction.ui similarity index 100% rename from SettingsAction.ui rename to ui/SettingsAction.ui diff --git a/SettingsBehavior.ui b/ui/SettingsBehavior.ui similarity index 100% rename from SettingsBehavior.ui rename to ui/SettingsBehavior.ui diff --git a/SettingsFineTune.ui b/ui/SettingsFineTune.ui similarity index 100% rename from SettingsFineTune.ui rename to ui/SettingsFineTune.ui diff --git a/SettingsPosition.ui b/ui/SettingsPosition.ui similarity index 100% rename from SettingsPosition.ui rename to ui/SettingsPosition.ui diff --git a/SettingsStyle.ui b/ui/SettingsStyle.ui similarity index 100% rename from SettingsStyle.ui rename to ui/SettingsStyle.ui From 7cf677a61837bec1b242e2d4825a3d96b84383d1 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 20:33:01 +0200 Subject: [PATCH 08/62] migrate animate appicon hover options dialog --- prefs.js | 3 + ui/AnimateAppIconHoverOptions.ui | 296 +++++++++++++++++++++++++++++++ 2 files changed, 299 insertions(+) create mode 100644 ui/AnimateAppIconHoverOptions.ui diff --git a/prefs.js b/prefs.js index 45a5b952..6bf5565d 100644 --- a/prefs.js +++ b/prefs.js @@ -166,6 +166,9 @@ const Preferences = class { this._builder.set_translation_domain(Me.metadata['gettext-domain']); if (window) { + // dialogs + this._builder.add_from_file(Me.path + '/ui/AnimateAppIconHoverOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); let pagePosition = this._builder.get_object('position'); window.add(pagePosition); diff --git a/ui/AnimateAppIconHoverOptions.ui b/ui/AnimateAppIconHoverOptions.ui new file mode 100644 index 00000000..28f7ad14 --- /dev/null +++ b/ui/AnimateAppIconHoverOptions.ui @@ -0,0 +1,296 @@ + + + + + + + 0 + 300 + 1 + 5 + + + + -30 + 30 + 1 + 5 + + + + 0 + 100 + 1 + 5 + + + + 100 + 250 + 1 + 5 + + + + 0 + 3 + 0.1 + 1 + + + + 1 + 10 + 0.1 + 1 + + + + True + False + vertical + 1 + 1 + + + True + True + False + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Animation type + 0 + + + + + True + False + center + + Simple + Ripple + Plank + + + + + + + + + + True + True + False + + + True + False + 12 + 12 + 12 + 12 + 24 + 32 + + + True + False + 12 + Duration + True + 0 + end + + 0 + 0 + + + + + + True + True + end + True + animate_appicon_hover_options_duration_adjustment + 0 + 0 + right + True + + 0 + 1 + + + + + + True + False + Rotation + 0 + end + + 1 + 0 + + + + + + True + True + end + True + animate_appicon_hover_options_rotation_adjustment + 0 + 0 + right + True + + 1 + 1 + + + + + + True + False + Travel + 0 + end + + 2 + 0 + + + + + + True + True + end + True + animate_appicon_hover_options_travel_adjustment + 0 + 0 + right + True + + 2 + 1 + + + + + + True + False + Zoom + 0 + end + + 3 + 0 + + + + + + True + True + end + True + animate_appicon_hover_options_zoom_adjustment + 0 + 0 + right + True + + 3 + 1 + + + + + + True + False + Convexity + 0 + end + + 4 + 0 + + + + + + True + True + end + True + animate_appicon_hover_options_convexity_adjustment + 1 + 1 + right + True + + 4 + 1 + + + + + + True + False + Extent + 0 + end + + 5 + 0 + + + + + + True + True + end + True + animate_appicon_hover_options_extent_adjustment + 0 + 0 + right + True + + 5 + 1 + + + + + + + + + + \ No newline at end of file From c3afaec504eba7f1ac9aa6c5a542f5e9f5cdd8fa Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 20:37:21 +0200 Subject: [PATCH 09/62] migrate box options dialog --- prefs.js | 1 + ui/BoxDotOptions.ui | 586 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 587 insertions(+) create mode 100644 ui/BoxDotOptions.ui diff --git a/prefs.js b/prefs.js index 6bf5565d..3496a35b 100644 --- a/prefs.js +++ b/prefs.js @@ -168,6 +168,7 @@ const Preferences = class { if (window) { // dialogs this._builder.add_from_file(Me.path + '/ui/AnimateAppIconHoverOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxDotOptions.ui'); this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); let pagePosition = this._builder.get_object('position'); diff --git a/ui/BoxDotOptions.ui b/ui/BoxDotOptions.ui new file mode 100644 index 00000000..d75e3375 --- /dev/null +++ b/ui/BoxDotOptions.ui @@ -0,0 +1,586 @@ + + + + + + 5 + 100 + 5 + 5 + + + + 5 + 1 + 5 + + + + True + False + 12 + 12 + vertical + 1 + 1 + + + True + False + 12 + 12 + 12 + 12 + 0 + + + True + False + none + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Highlight focused application + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + True + False + 12 + 8 + + + True + False + True + Icon dominant color + 0 + + 0 + 0 + + + + + + True + True + end + center + + + + + True + False + True + Custom color + 0 + + 1 + 0 + + + + + + True + True + True + end + + 1 + 1 + + + + + + True + False + True + Highlight opacity + 0 + + 2 + 0 + + + + + + True + True + end + 5 + focus_highlight_opacity_adjustment + 5 + + 2 + 1 + + + + + 1 + 0 + 2 + + + + + + + + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Indicator size (px) + 0 + + 0 + 0 + + + + + + True + True + end + 0 + dot_size_adjustment + + 0 + 1 + + + + + + + + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Indicator color - Icon Dominant + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + + + + + 100 + 80 + True + True + + + True + False + 12 + 12 + vertical + + + True + False + + + True + False + True + Indicator color - Override Theme + 0 + + + + + True + True + end + center + + + + + + + True + False + 12 + 12 + 12 + 4 + 32 + + + True + False + True + 1 window open (or ungrouped) + 0 + + 0 + 0 + + + + + + True + False + end + + + Apply to all + True + True + True + + + + + True + True + True + end + + + + 0 + 1 + + + + + + True + False + True + 2 windows open + 0 + + 1 + 0 + + + + + + True + False + True + 3 windows open + 0 + + 2 + 0 + + + + + + True + False + True + 4+ windows open + 0 + + 3 + 0 + + + + + + True + True + True + end + + 1 + 1 + + + + + + True + True + True + end + + 2 + 1 + + + + + + True + True + True + end + + 3 + 1 + + + + + + + + True + False + vertical + + + True + False + 12 + + + True + False + True + Use different for unfocused + 0 + + + + + True + True + end + center + + + + + + + True + False + 12 + 12 + 12 + 4 + 32 + + + True + False + True + 1 window open (or ungrouped) + 0 + + 0 + 0 + + + + + + True + False + end + + + Apply to all + True + True + True + + + + + True + True + True + end + + + + 0 + 1 + + + + + + True + False + True + 2 windows open + 0 + + 1 + 0 + + + + + + True + True + True + end + + 1 + 1 + + + + + + True + False + True + 3 windows open + 0 + + 2 + 0 + + + + + + True + True + True + end + + 2 + 1 + + + + + + True + False + True + 4+ windows open + 0 + + 3 + 0 + + + + + + True + True + True + end + + 3 + 1 + + + + + + + + + + + + + + + + + + \ No newline at end of file From 85501a943c0026723a403135a3f26c05c1d460c3 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 20:44:28 +0200 Subject: [PATCH 10/62] migrate box show desktop dialog --- prefs.js | 1 + ui/BoxShowDesktopOptions.ui | 243 ++++++++++++++++++++++++++++++++++++ 2 files changed, 244 insertions(+) create mode 100644 ui/BoxShowDesktopOptions.ui diff --git a/prefs.js b/prefs.js index 3496a35b..283e1c17 100644 --- a/prefs.js +++ b/prefs.js @@ -169,6 +169,7 @@ const Preferences = class { // dialogs this._builder.add_from_file(Me.path + '/ui/AnimateAppIconHoverOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxDotOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxShowDesktopOptions.ui'); this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); let pagePosition = this._builder.get_object('position'); diff --git a/ui/BoxShowDesktopOptions.ui b/ui/BoxShowDesktopOptions.ui new file mode 100644 index 00000000..8b976db5 --- /dev/null +++ b/ui/BoxShowDesktopOptions.ui @@ -0,0 +1,243 @@ + + + + + + 1 + 40 + 1 + 10 + + + + 5000 + 10 + 100 + + + + 5000 + 10 + 100 + + + + True + False + vertical + + + True + False + none + 1 + 1 + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 4 + 32 + + + True + False + True + 0 + + 0 + 0 + + + + + + True + True + end + 4 + 1 + show_showdesktop_width_adjustment + True + 1 + + 0 + 1 + + + + + + True + False + True + Override Show Desktop line color + 0 + + 1 + 0 + + + + + + True + False + 12 + end + + + True + True + True + end + True + + + + + True + True + end + center + + + + 1 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Reveal the desktop when hovering the Show Desktop button + True + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + True + False + 4 + + + True + False + True + Delay before revealing the desktop (ms) + True + 0 + + 0 + 0 + + + + + + True + True + end + 4 + 1 + show_showdesktop_delay_adjustment + True + 1 + + 0 + 1 + + + + + + True + False + True + Fade duration (ms) + True + 0 + + 1 + 0 + + + + + + True + True + end + 4 + 1 + show_showdesktop_time_adjustment + True + 1 + + 1 + 1 + + + + + 1 + 0 + 2 + + + + + + + + + + + + \ No newline at end of file From cb15f065b4f2789933b5c483f4ee84364ce1f617 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 20:50:04 +0200 Subject: [PATCH 11/62] set missing ids --- ui/SettingsPosition.ui | 2 +- ui/SettingsStyle.ui | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/SettingsPosition.ui b/ui/SettingsPosition.ui index 5fd631ef..fd01180d 100644 --- a/ui/SettingsPosition.ui +++ b/ui/SettingsPosition.ui @@ -203,7 +203,7 @@ - + Anchor diff --git a/ui/SettingsStyle.ui b/ui/SettingsStyle.ui index 5a27e3f4..a31c1f1c 100644 --- a/ui/SettingsStyle.ui +++ b/ui/SettingsStyle.ui @@ -264,7 +264,7 @@ - + Dynamic background opacity Change opacity when a window gets close to the panel From 8d0621cc54a3e6a8ea1d7c422c82ca8354ca9052 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 20:53:32 +0200 Subject: [PATCH 12/62] migrate box dynamic opacity options dialog --- prefs.js | 1 + ui/BoxDynamicOpacityOptions.ui | 213 +++++++++++++++++++++++++++++++++ 2 files changed, 214 insertions(+) create mode 100644 ui/BoxDynamicOpacityOptions.ui diff --git a/prefs.js b/prefs.js index 283e1c17..c32de1bb 100644 --- a/prefs.js +++ b/prefs.js @@ -170,6 +170,7 @@ const Preferences = class { this._builder.add_from_file(Me.path + '/ui/AnimateAppIconHoverOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxDotOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxShowDesktopOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxDynamicOpacityOptions.ui'); this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); let pagePosition = this._builder.get_object('position'); diff --git a/ui/BoxDynamicOpacityOptions.ui b/ui/BoxDynamicOpacityOptions.ui new file mode 100644 index 00000000..bc2e935d --- /dev/null +++ b/ui/BoxDynamicOpacityOptions.ui @@ -0,0 +1,213 @@ + + + + + + 200 + 1 + 10 + + + + 100 + 5 + 10 + + + + 2000 + 1 + 10 + + + + True + False + vertical + 1 + 1 + + + True + False + none + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 4 + + + True + False + True + The panel background opacity is affected by + 0 + + 0 + 0 + + + + + + True + False + center + + All windows + Focused windows + Maximized windows + + + 0 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + True + end + 4 + 50 + trans_distance_adjustment + True + 50 + + 0 + 1 + + + + + + True + False + True + Change opacity when a window gets closer than (px) + True + 0 + + 0 + 0 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + + + True + False + 12 + Change opacity to (%) + True + 0 + + + + + True + True + end + 0 + trans_opacity_min_adjustment + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + True + end + 4 + 50 + trans_anim_time_adjustment + True + 50 + + 0 + 1 + + + + + + True + False + True + Opacity change animation duration (ms) + True + 0 + + 0 + 0 + + + + + + + + + + + + \ No newline at end of file From b9f73a11cd90ceb01d3657cd350f2366033c2e79 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 20:55:40 +0200 Subject: [PATCH 13/62] add missing id --- ui/SettingsStyle.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/SettingsStyle.ui b/ui/SettingsStyle.ui index a31c1f1c..a97a936f 100644 --- a/ui/SettingsStyle.ui +++ b/ui/SettingsStyle.ui @@ -309,7 +309,7 @@ - + Gradient top color and opacity (%) From 868807ea392c26a96897487b6a00e787fdded0ee Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 21:00:27 +0200 Subject: [PATCH 14/62] migrate box intellihide options dialog --- prefs.js | 1 + ui/BoxIntellihideOptions.ui | 552 ++++++++++++++++++++++++++++++++++++ 2 files changed, 553 insertions(+) create mode 100644 ui/BoxIntellihideOptions.ui diff --git a/prefs.js b/prefs.js index c32de1bb..450fbf44 100644 --- a/prefs.js +++ b/prefs.js @@ -171,6 +171,7 @@ const Preferences = class { this._builder.add_from_file(Me.path + '/ui/BoxDotOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxShowDesktopOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxDynamicOpacityOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxIntellihideOptions.ui'); this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); let pagePosition = this._builder.get_object('position'); diff --git a/ui/BoxIntellihideOptions.ui b/ui/BoxIntellihideOptions.ui new file mode 100644 index 00000000..92125bdb --- /dev/null +++ b/ui/BoxIntellihideOptions.ui @@ -0,0 +1,552 @@ + + + + + + 1 + 9990 + 10 + 100 + + + + 1 + 5000 + 10 + 100 + + + + 10 + 2000 + 10 + 100 + + + + 10 + 4000 + 10 + 100 + + + + 10000 + 10 + 100 + + + + True + False + vertical + 1 + 1 + + + True + False + 0 + + + True + False + none + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 12 + 32 + True + + + True + False + True + Only hide the panel when it is obstructed by windows + True + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + True + False + 12 + 4 + + + True + False + True + The panel hides from + 0 + + 0 + 0 + + + + + + True + False + center + + All windows + Focused windows + Maximized windows + + + 0 + 1 + + + + + 1 + 0 + 2 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Require pressure at the edge of the screen to reveal the panel + True + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + True + False + 12 + 4 + + + True + False + True + Required pressure threshold (px) + True + 0 + + 0 + 0 + + + + + + True + True + end + 4 + 0 + intellihide_pressure_threshold_adjustment + True + + 0 + 1 + + + + + + True + False + True + Required pressure timeout (ms) + True + 0 + + 1 + 0 + + + + + + True + True + end + 4 + 0 + intellihide_pressure_time_adjustment + True + + 1 + 1 + + + + + 1 + 0 + 2 + + + + + + + + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Allow the panel to be revealed while in fullscreen mode + True + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Only hide secondary panels (requires multi-monitors option) + True + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + center + 12 + e.g. <Super>i + + 0 + 1 + 2 + + + + + + True + False + True + Keyboard shortcut to reveal and hold the panel + 0 + + 0 + 0 + + + + + + True + False + Syntax: <Shift>, <Ctrl>, <Alt>, <Super> + True + 40 + 0 + + + 1 + 0 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Hide and reveal animation duration (ms) + 0 + + 0 + 0 + + + + + + True + True + end + 4 + 0 + intellihide_animation_time_adjustment + True + + 0 + 1 + + + + + + + + + + 100 + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Delay before hiding the panel (ms) + 0 + + 0 + 0 + + + + + + True + True + end + 4 + 10 + intellihide_close_delay_adjustment + True + 10 + + 0 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Delay before enabling intellihide on start (ms) + True + 0 + + 0 + 0 + + + + + + True + True + end + 4 + 10 + intellihide_enable_hide_delay_adjustment + True + 10 + + 0 + 1 + + + + + + + + + + + + + + \ No newline at end of file From b0df870721f7ad499a8f7b355facf8503478b113 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 21:07:55 +0200 Subject: [PATCH 15/62] migrate show applications options dialog --- prefs.js | 1 + ui/ShowApplicationsOptions.ui | 178 ++++++++++++++++++++++++++++++++++ 2 files changed, 179 insertions(+) create mode 100644 ui/ShowApplicationsOptions.ui diff --git a/prefs.js b/prefs.js index 450fbf44..a1a41809 100644 --- a/prefs.js +++ b/prefs.js @@ -172,6 +172,7 @@ const Preferences = class { this._builder.add_from_file(Me.path + '/ui/BoxShowDesktopOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxDynamicOpacityOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxIntellihideOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/ShowApplicationsOptions.ui'); this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); let pagePosition = this._builder.get_object('position'); diff --git a/ui/ShowApplicationsOptions.ui b/ui/ShowApplicationsOptions.ui new file mode 100644 index 00000000..dd2e605d --- /dev/null +++ b/ui/ShowApplicationsOptions.ui @@ -0,0 +1,178 @@ + + + + + + 100 + 1 + 10 + + + + True + False + vertical + 1 + 1 + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Current Show Applications icon + True + 0 + + 0 + 0 + + + + + + 32 + 32 + True + False + end + gtk-missing-image + 32 + + 0 + 1 + + + + + + 140 + True + + 1 + 1 + + + + + + True + False + True + Custom Show Applications image icon + True + 0 + + 1 + 0 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + True + 6 + 32 + + + True + True + end + 0 + show_applications_side_padding_adjustment + + 0 + 1 + + + + + + True + False + True + Show Applications icon side padding (px) + 0 + + 0 + 0 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + True + end + center + + 0 + 1 + + + + + + True + False + True + Override escape key and return to desktop + True + 0 + + 0 + 0 + + + + + + + + + + \ No newline at end of file From 10a6e2738ebeccf1c663f8ff72e06cd826fe30f0 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 21:12:26 +0200 Subject: [PATCH 16/62] migrate box window preview options dialog --- prefs.js | 1 + ui/BoxWindowPreviewOptions.ui | 1046 +++++++++++++++++++++++++++++++++ 2 files changed, 1047 insertions(+) create mode 100644 ui/BoxWindowPreviewOptions.ui diff --git a/prefs.js b/prefs.js index a1a41809..8b2420d1 100644 --- a/prefs.js +++ b/prefs.js @@ -173,6 +173,7 @@ const Preferences = class { this._builder.add_from_file(Me.path + '/ui/BoxDynamicOpacityOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxIntellihideOptions.ui'); this._builder.add_from_file(Me.path + '/ui/ShowApplicationsOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxWindowPreviewOptions.ui'); this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); let pagePosition = this._builder.get_object('position'); diff --git a/ui/BoxWindowPreviewOptions.ui b/ui/BoxWindowPreviewOptions.ui new file mode 100644 index 00000000..bb9358b2 --- /dev/null +++ b/ui/BoxWindowPreviewOptions.ui @@ -0,0 +1,1046 @@ + + + + + + 9999 + 25 + 100 + + + + 1000 + 10 + 50 + + + + 9999 + 25 + 100 + + + + 100 + 800 + 10 + 50 + + + + 50 + 1 + 5 + + + + 100 + 5 + 10 + + + + 8 + 48 + 1 + 100 + + + + 6 + 24 + 1 + 100 + + + + 50 + 9999 + 25 + 100 + + + + 255 + 10 + 25 + + + + True + True + 460 + 480 + + + True + False + True + True + natural + natural + + + True + False + none + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 12 + 32 + + + True + True + end + 4 + 0 + preview_timeout_adjustment + True + + 0 + 1 + + + + + + True + False + True + Time (ms) before showing (400 is default) + True + 0 + + 0 + 0 + + + + + + True + False + True + Animation time (ms) + 0 + + 2 + 0 + + + + + + True + True + end + 4 + 0 + preview_animation_time_adjustment + True + + 2 + 1 + + + + + + True + False + vertical + + + True + False + True + Time (ms) before hiding (100 is default) + 0 + + + + + True + True + False + 12 + 4 + + + 4 + True + False + start + 4 + Immediate on application icon click + True + + + + + + 1 + 0 + + + + + + True + True + end + center + 4 + 25 + leave_timeout_adjustment + True + 25 + + 1 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Middle click on the preview to close the window + True + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Window previews preferred size (px) + True + 0 + + 0 + 0 + 2 + + + + + + True + True + end + 4 + 100 + preview_size_adjustment + True + 100 + + + + + True + False + True + Window previews aspect ratio Y (height) + True + 0 + + 2 + 0 + + + + + + True + False + True + Window previews padding (px) + True + 0 + + 3 + 0 + + + + + + True + True + end + 4 + 50 + preview_padding_adjustment + True + 50 + + 3 + 1 + + + + + + True + False + end + 2 + True + + + True + False + end + center + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + + + + + + Fixed + True + True + True + end + + + + 1 + 1 + + + + + + True + False + True + Window previews aspect ratio X (width) + True + 0 + + 1 + 0 + + + + + + True + False + end + 2 + True + + + True + False + end + center + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + + + + + + Fixed + True + True + True + end + + + + 2 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Use custom opacity for the previews background + True + 0 + + 0 + 0 + + + + + + True + False + True + If disabled, the previews background have the same opacity as the panel + True + 40 + 0 + + + 1 + 0 + 2 + + + + + + True + False + 8 + + + True + True + end + center + + + + + True + True + end + center + 5 + preview_opacity_adjustment + 5 + + + + 0 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Close button and header position + 0 + + + + + True + False + end + 32 + + + Bottom + True + True + False + center + center + True + + + + + + Top + True + True + False + center + center + preview_title_position_bottom_button + + + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Display window preview headers + True + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + True + False + 12 + 32 + + + True + False + 8 + + + True + True + end + center + + + + + True + True + end + 4 + 6 + preview_custom_icon_size_adjustment + True + 6 + + + + 0 + 1 + + + + + + True + False + True + Icon size (px) of the window preview + True + 0 + + 1 + 0 + + + + + + True + False + True + If disabled, the previews icon size will be based on headerbar size + True + 40 + 0 + + + 1 + 0 + 2 + + + + + 1 + 0 + 2 + + + + + + True + False + 12 + 32 + + + True + True + end + 4 + 6 + preview_title_font_size_adjustment + True + 6 + + 0 + 1 + + + + + + True + False + True + Font size (px) of the preview titles + True + 0 + + 0 + 0 + + + + + 2 + 0 + 2 + + + + + + True + False + 12 + 32 + + + True + False + True + Font weight of the preview titles + 0 + + 0 + 0 + + + + + + True + False + end + center + + inherit from theme + normal + lighter + bold + bolder + + + 0 + 1 + + + + + 3 + 0 + 2 + + + + + + True + False + 12 + 32 + + + True + False + True + Font color of the preview titles + True + 0 + + 0 + 0 + + + + + + True + True + True + end + + 0 + 1 + + + + + 4 + 0 + 2 + + + + + + + + + + True + True + 6 + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Enable window peeking + True + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + True + False + True + When hovering over a window preview for some time, the window gets distinguished. + True + 40 + 0 + + + 1 + 0 + 2 + + + + + + True + False + 12 + 32 + + + True + False + True + Enter window peeking mode timeout (ms) + 0 + + 0 + 0 + + + + + + True + True + end + 4 + 50 + enter_peek_mode_timeout_adjustment + True + 50 + + 0 + 1 + + + + + + True + False + True + Time of inactivity while hovering over a window preview needed to enter the window peeking mode. + True + 40 + 0 + + + 1 + 0 + 2 + + + + + 2 + 0 + 2 + + + + + + True + False + 12 + 32 + + + True + False + True + Window peeking mode opacity + 0 + + 0 + 0 + + + + + + True + True + end + 4 + 0 + peek_mode_opacity_adjustment + True + + 0 + 1 + + + + + + True + False + True + All windows except for the peeked one have their opacity set to the same value. + True + 40 + 0 + + + 1 + 0 + 2 + + + + + 3 + 0 + 2 + + + + + + + + + + + + + + \ No newline at end of file From 3732c9ed2acf725b8abd954f08640694aa7d38da Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 21:15:17 +0200 Subject: [PATCH 17/62] migrate box group apps options dialog --- prefs.js | 2 + ui/BoxGroupAppsOptions.ui | 410 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 412 insertions(+) create mode 100644 ui/BoxGroupAppsOptions.ui diff --git a/prefs.js b/prefs.js index 8b2420d1..6d42e963 100644 --- a/prefs.js +++ b/prefs.js @@ -174,7 +174,9 @@ const Preferences = class { this._builder.add_from_file(Me.path + '/ui/BoxIntellihideOptions.ui'); this._builder.add_from_file(Me.path + '/ui/ShowApplicationsOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxWindowPreviewOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxGroupAppsOptions.ui'); + // pages this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); let pagePosition = this._builder.get_object('position'); window.add(pagePosition); diff --git a/ui/BoxGroupAppsOptions.ui b/ui/BoxGroupAppsOptions.ui new file mode 100644 index 00000000..07cff47f --- /dev/null +++ b/ui/BoxGroupAppsOptions.ui @@ -0,0 +1,410 @@ + + + + + + 6 + 24 + 1 + 100 + + + + 1000 + 10 + 100 + + + + True + False + vertical + 1 + 1 + + + True + False + 0 + + + True + False + none + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + True + end + 4 + 0 + group_apps_label_font_size_adjustment + True + + 0 + 1 + + + + + + True + False + True + Font size (px) of the application titles (default is 14) + True + 0 + + 0 + 0 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Font weight of application titles + 0 + + 0 + 0 + + + + + + True + False + center + + inherit from theme + normal + lighter + bold + bolder + + + 0 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Font color of the application titles + True + 0 + + 0 + 0 + + + + + + True + True + True + end + + 0 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Font color of the minimized application titles + True + 0 + + 0 + 0 + + + + + + True + True + True + end + + 0 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Maximum width (px) of the application titles (default is 160) + 0 + + 0 + 0 + + + + + + True + True + end + 4 + 0 + group_apps_label_max_width_adjustment + True + + 0 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Use a fixed width for the application titles + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + True + False + True + The application titles all have the same width, even if their texts are shorter than the maximum width. The maximum width value is used as the fixed width. + True + 40 + 0 + + + 1 + 0 + 2 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Display running indicators on unfocused applications + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Use the favorite icons as application launchers + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + + + + + + + + + \ No newline at end of file From 94315f6aecb24aede921ec4235827da57cd17acb Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 21:17:27 +0200 Subject: [PATCH 18/62] migrate box middle click options --- prefs.js | 1 + ui/BoxMiddleClickOptions.ui | 245 ++++++++++++++++++++++++++++++++++++ 2 files changed, 246 insertions(+) create mode 100644 ui/BoxMiddleClickOptions.ui diff --git a/prefs.js b/prefs.js index 6d42e963..55f0d4b9 100644 --- a/prefs.js +++ b/prefs.js @@ -175,6 +175,7 @@ const Preferences = class { this._builder.add_from_file(Me.path + '/ui/ShowApplicationsOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxWindowPreviewOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxGroupAppsOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxMiddleClickOptions.ui'); // pages this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); diff --git a/ui/BoxMiddleClickOptions.ui b/ui/BoxMiddleClickOptions.ui new file mode 100644 index 00000000..1f0c8125 --- /dev/null +++ b/ui/BoxMiddleClickOptions.ui @@ -0,0 +1,245 @@ + + + + + + True + False + 12 + 12 + 12 + 12 + vertical + 1 + 1 + + + True + False + 0 + + + True + False + none + + + 100 + 80 + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + When set to minimize, double clicking minimizes all the windows of the application. + True + 40 + 0 + + + 1 + 0 + + + + + + True + False + True + Shift+Click action + 0 + + 0 + 0 + + + + + + True + False + center + + Raise windows + Minimize window + Launch new instance + Cycle through windows + Cycle windows + minimize + Toggle single / Preview multiple + Toggle single / Cycle multiple + Quit + + + 0 + 1 + 2 + + + + + + + + + + 100 + 80 + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Behavior for Middle-Click. + True + 40 + 0 + + + 1 + 0 + + + + + + True + False + True + Middle-Click action + 0 + + 0 + 0 + + + + + + True + False + center + + Raise windows + Minimize window + Launch new instance + Cycle through windows + Cycle windows + minimize + Toggle single / Preview multiple + Quit + + + 0 + 1 + 2 + + + + + + + + + + 100 + 80 + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Behavior for Shift+Middle-Click. + True + 40 + 0 + + + 1 + 0 + + + + + + True + False + True + Shift+Middle-Click action + 0 + + 0 + 0 + + + + + + True + False + center + + Raise windows + Minimize window + Launch new instance + Cycle through windows + Cycle windows + minimize + Toggle single / Preview multiple + Quit + + + 0 + 1 + 2 + + + + + + + + + + + + + + \ No newline at end of file From e5131668f05ffaf217970a4245dfdc1dbfad8eeb Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 21:30:47 +0200 Subject: [PATCH 19/62] migrate box overlay shortcut dialog --- prefs.js | 1 + ui/BoxOverlayShortcut.ui | 399 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 400 insertions(+) create mode 100644 ui/BoxOverlayShortcut.ui diff --git a/prefs.js b/prefs.js index 55f0d4b9..82664f41 100644 --- a/prefs.js +++ b/prefs.js @@ -176,6 +176,7 @@ const Preferences = class { this._builder.add_from_file(Me.path + '/ui/BoxWindowPreviewOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxGroupAppsOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxMiddleClickOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxOverlayShortcut.ui'); // pages this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); diff --git a/ui/BoxOverlayShortcut.ui b/ui/BoxOverlayShortcut.ui new file mode 100644 index 00000000..85c678e1 --- /dev/null +++ b/ui/BoxOverlayShortcut.ui @@ -0,0 +1,399 @@ + + + + + + 10000 + 250 + 1000 + + + + True + False + 12 + 12 + 12 + 12 + vertical + 1 + 1 + + + True + False + 0 + + + True + False + none + + + 100 + 80 + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + center + + Super + Super + Alt + + + 0 + 1 + 2 + + + + + + True + False + True + Hotkeys prefix + 0 + + 0 + 0 + + + + + + True + False + Hotkeys will either be Super+Number or Super+Alt+Num + True + 40 + 0 + + + 1 + 0 + + + + + + + + + + 100 + 80 + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + center + + Never + Show temporarily + Always visible + + + 0 + 1 + 2 + + + + + + True + False + True + Number overlay + 0 + + 0 + 0 + + + + + + True + False + Temporarily show the application numbers over the icons when using the hotkeys. + True + 40 + 0 + + + 1 + 0 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + True + 6 + 32 + + + True + True + end + shortcut_time_adjustment + + 0 + 1 + + + + + + True + False + True + Hide timeout (ms) + 0 + + 0 + 0 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + center + 12 + e.g. <Super>q + + 0 + 1 + 2 + + + + + + True + False + True + Shortcut to show the overlay for 2 seconds + 0 + + 0 + 0 + + + + + + True + False + Syntax: <Shift>, <Ctrl>, <Alt>, <Super> + True + 40 + 0 + + + 1 + 0 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Show window previews on hotkey + True + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + 2 + + + + + + True + False + True + Show previews when the application have multiple instances + True + 40 + 0 + + + 1 + 0 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + end + center + + Number row + Numeric keypad + Both + + + 0 + 1 + 2 + + + + + + True + False + True + Hotkeys are activated with + 0 + + 0 + 0 + + + + + + True + False + Select which keyboard number keys are used to activate the hotkeys + True + 40 + 0 + + + 1 + 0 + + + + + + + + + + + + + + \ No newline at end of file From de3a106bad9631784cd8925664d5fbf207c4ad7b Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 21:31:09 +0200 Subject: [PATCH 20/62] add advanced options button --- ui/SettingsFineTune.ui | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ui/SettingsFineTune.ui b/ui/SettingsFineTune.ui index 1b7ed5ed..29126ee5 100644 --- a/ui/SettingsFineTune.ui +++ b/ui/SettingsFineTune.ui @@ -269,5 +269,22 @@ + + + + + + + Advanced Options + False + True + True + end + + + + + + \ No newline at end of file From 20a522607ef66cd4d34c78b8e9cce49e210f101d Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 21:35:40 +0200 Subject: [PATCH 21/62] most things work now --- prefs.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/prefs.js b/prefs.js index 82664f41..35031ffc 100644 --- a/prefs.js +++ b/prefs.js @@ -206,9 +206,6 @@ const Preferences = class { // set the window as notebook, it is being used as parent for dialogs this.notebook = window; - // TODO return for now, many things are still missing - return; - } else { this._builder.add_from_file(Me.path + '/Settings.ui'); this.notebook = this._builder.get_object('settings_notebook'); From 87aa7fb62becafd752819f62a5e053be361b1d31 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 21:39:50 +0200 Subject: [PATCH 22/62] migrate box secondary menu options dialog --- prefs.js | 1 + ui/BoxSecondaryMenuOptions.ui | 119 ++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 ui/BoxSecondaryMenuOptions.ui diff --git a/prefs.js b/prefs.js index 35031ffc..592a7a72 100644 --- a/prefs.js +++ b/prefs.js @@ -177,6 +177,7 @@ const Preferences = class { this._builder.add_from_file(Me.path + '/ui/BoxGroupAppsOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxMiddleClickOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxOverlayShortcut.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxSecondaryMenuOptions.ui'); // pages this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); diff --git a/ui/BoxSecondaryMenuOptions.ui b/ui/BoxSecondaryMenuOptions.ui new file mode 100644 index 00000000..c58ba17f --- /dev/null +++ b/ui/BoxSecondaryMenuOptions.ui @@ -0,0 +1,119 @@ + + + + + + True + False + vertical + 1 + 1 + + + True + False + 0 + + + True + False + none + + + 100 + 80 + True + True + + + True + False + center + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Integrate <i>AppMenu</i> items + True + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + + + + + 100 + 80 + True + True + + + True + False + center + 12 + 12 + 12 + 12 + 32 + + + True + False + True + <i>Show Details</i> menu item + True + 0 + + 0 + 0 + + + + + + True + True + end + center + + 0 + 1 + + + + + + + + + + + + + + \ No newline at end of file From 3c12a114eb9878ecc2d5ab2efdb8839cfb41c9fe Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 21:47:10 +0200 Subject: [PATCH 23/62] migrate scroll panel options box dialog --- prefs.js | 1 + ui/ScrollPanelOptionsBox.ui | 153 ++++++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 ui/ScrollPanelOptionsBox.ui diff --git a/prefs.js b/prefs.js index 592a7a72..584e1041 100644 --- a/prefs.js +++ b/prefs.js @@ -178,6 +178,7 @@ const Preferences = class { this._builder.add_from_file(Me.path + '/ui/BoxMiddleClickOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxOverlayShortcut.ui'); this._builder.add_from_file(Me.path + '/ui/BoxSecondaryMenuOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/ScrollPanelOptionsBox.ui'); // pages this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); diff --git a/ui/ScrollPanelOptionsBox.ui b/ui/ScrollPanelOptionsBox.ui new file mode 100644 index 00000000..95c7fd5d --- /dev/null +++ b/ui/ScrollPanelOptionsBox.ui @@ -0,0 +1,153 @@ + + + + + + 2000 + 10 + 50 + + + + True + False + vertical + 1 + 1 + + + True + False + none + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + True + end + center + 4 + 50 + scroll_panel_options_delay_adjustment + True + 50 + + 0 + 1 + 2 + + + + + + True + False + True + Delay between mouse scroll events (ms) + True + 0 + + 0 + 0 + + + + + + True + False + True + Use this value to limit the number of captured mouse scroll events. + True + 0 + + + 1 + 0 + + + + + + + + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + False + True + Show popup when changing workspace + True + 0 + + 0 + 0 + + + + + + True + False + True + This affects workspace popup when scrolling on the panel only. + True + 0 + + + 1 + 0 + + + + + + True + True + end + center + + 0 + 1 + 2 + + + + + + + + + + + + \ No newline at end of file From e4190415d05e3eea8ae7dc8d6e06918335219cbc Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 22:08:20 +0200 Subject: [PATCH 24/62] migrate scroll icon options box dialog --- prefs.js | 1 + ui/ScrollIconOptionsBox.ui | 92 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 ui/ScrollIconOptionsBox.ui diff --git a/prefs.js b/prefs.js index 584e1041..32cf89de 100644 --- a/prefs.js +++ b/prefs.js @@ -179,6 +179,7 @@ const Preferences = class { this._builder.add_from_file(Me.path + '/ui/BoxOverlayShortcut.ui'); this._builder.add_from_file(Me.path + '/ui/BoxSecondaryMenuOptions.ui'); this._builder.add_from_file(Me.path + '/ui/ScrollPanelOptionsBox.ui'); + this._builder.add_from_file(Me.path + '/ui/ScrollIconOptionsBox.ui'); // pages this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); diff --git a/ui/ScrollIconOptionsBox.ui b/ui/ScrollIconOptionsBox.ui new file mode 100644 index 00000000..27af04e4 --- /dev/null +++ b/ui/ScrollIconOptionsBox.ui @@ -0,0 +1,92 @@ + + + + + + 2000 + 10 + 50 + + + + True + False + vertical + 1 + 1 + + + True + False + none + + + True + True + + + True + False + 12 + 12 + 12 + 12 + 32 + + + True + True + end + center + 4 + 50 + scroll_icon_options_delay_adjustment + True + 50 + + 0 + 1 + 2 + + + + + + True + False + True + Delay between mouse scroll events (ms) + True + 0 + + 0 + 0 + + + + + + True + False + True + Use this value to limit the number of captured mouse scroll events. + True + 0 + + + 1 + 0 + + + + + + + + + + + + \ No newline at end of file From 721cd3218def822a65ac74c744422d2010ac16f4 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 6 Apr 2022 22:12:19 +0200 Subject: [PATCH 25/62] migrate box advanced options dialog --- prefs.js | 1 + ui/BoxAdvancedOptions.ui | 44 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 ui/BoxAdvancedOptions.ui diff --git a/prefs.js b/prefs.js index 32cf89de..fc58f3c5 100644 --- a/prefs.js +++ b/prefs.js @@ -180,6 +180,7 @@ const Preferences = class { this._builder.add_from_file(Me.path + '/ui/BoxSecondaryMenuOptions.ui'); this._builder.add_from_file(Me.path + '/ui/ScrollPanelOptionsBox.ui'); this._builder.add_from_file(Me.path + '/ui/ScrollIconOptionsBox.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxAdvancedOptions.ui'); // pages this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); diff --git a/ui/BoxAdvancedOptions.ui b/ui/BoxAdvancedOptions.ui new file mode 100644 index 00000000..fd71fc04 --- /dev/null +++ b/ui/BoxAdvancedOptions.ui @@ -0,0 +1,44 @@ + + + + + + True + False + vertical + 1 + 1 + + + True + False + 0 + + + True + False + none + + + 100 + 80 + True + True + + + True + False + True + Nothing yet! + True + + + + + + + + + + + \ No newline at end of file From 7c1c1b306be5f85e05bdac2d2ba166b6a5fb8f3c Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Thu, 7 Apr 2022 00:35:37 +0200 Subject: [PATCH 26/62] move preferences dialog create into _createPreferencesDialog --- prefs.js | 696 ++++++++++++++++++++----------------------------------- 1 file changed, 252 insertions(+), 444 deletions(-) diff --git a/prefs.js b/prefs.js index fc58f3c5..02d7997d 100644 --- a/prefs.js +++ b/prefs.js @@ -481,18 +481,51 @@ const Preferences = class { }); } - _showShowAppsButtonOptions() { - let dialog = new Gtk.Dialog({ title: _('Show Applications options'), + _createPreferencesDialog(title, content, reset_function = null) { + let dialog; + + if (true) { // Config.PACKAGE_VERSION < '42') { + dialog = new Gtk.Dialog({ title: title, transient_for: this.notebook.get_root(), use_header_bar: true, modal: true }); - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); + // GTK+ leaves positive values for application-defined response ids. + // Use +1 for the reset action + if (reset_function != null) + dialog.add_button(_('Reset to defaults'), 1); + + dialog.get_content_area().append(content); + + dialog.connect('response', (dialog, id) => { + if (id == 1) { + // restore default settings + if (reset_function) + reset_function(); + } else { + // remove the settings content so it doesn't get destroyed; + dialog.get_content_area().remove(content); + dialog.destroy(); + } + return; + }); + } else { + dialog = new Adw.PreferencesWindow({ title: title }); + } + return dialog; + } + _showShowAppsButtonOptions() { let box = this._builder.get_object('show_applications_options'); - dialog.get_content_area().append(box); + + let dialog = this._createPreferencesDialog(_('Show Applications options'), box, () => + { + // restore default settings + this._settings.set_value('show-apps-icon-side-padding', this._settings.get_default_value('show-apps-icon-side-padding')); + this._builder.get_object('show_applications_side_padding_spinbutton').set_value(this._settings.get_int('show-apps-icon-side-padding')); + this._settings.set_value('show-apps-override-escape', this._settings.get_default_value('show-apps-override-escape')); + handleIconChange.call(this, null); + }); let fileChooserButton = this._builder.get_object('show_applications_icon_file_filebutton'); let fileChooser = new Gtk.FileChooserNative({ title: _('Open icon'), transient_for: dialog }); @@ -527,17 +560,9 @@ const Preferences = class { fileChooser.connect('response', widget => handleIconChange.call(this, widget.get_file().get_path())); handleIconChange.call(this, this._settings.get_string('show-apps-icon-file')); + // we have to destroy the fileChooser as well dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings - this._settings.set_value('show-apps-icon-side-padding', this._settings.get_default_value('show-apps-icon-side-padding')); - this._builder.get_object('show_applications_side_padding_spinbutton').set_value(this._settings.get_int('show-apps-icon-side-padding')); - this._settings.set_value('show-apps-override-escape', this._settings.get_default_value('show-apps-override-escape')); - handleIconChange.call(this, null); - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(box); - dialog.destroy(); + if (id != 1) { fileChooser.destroy(); } return; @@ -548,17 +573,24 @@ const Preferences = class { } _showDesktopButtonOptions() { - let dialog = new Gtk.Dialog({ title: _('Show Desktop options'), - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); + let box = this._builder.get_object('box_show_showdesktop_options'); + + let dialog = this._createPreferencesDialog(_('Show Desktop options'), box, () => + { + // restore default settings + this._settings.set_value('showdesktop-button-width', this._settings.get_default_value('showdesktop-button-width')); + this._builder.get_object('show_showdesktop_width_spinbutton').set_value(this._settings.get_int('showdesktop-button-width')); - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); + this._settings.set_value('desktop-line-use-custom-color', this._settings.get_default_value('desktop-line-use-custom-color')); - let box = this._builder.get_object('box_show_showdesktop_options'); - dialog.get_content_area().append(box); + this._settings.set_value('show-showdesktop-hover', this._settings.get_default_value('show-showdesktop-hover')); + + this._settings.set_value('show-showdesktop-delay', this._settings.get_default_value('show-showdesktop-delay')); + this._builder.get_object('show_showdesktop_delay_spinbutton').set_value(this._settings.get_int('show-showdesktop-delay')); + + this._settings.set_value('show-showdesktop-time', this._settings.get_default_value('show-showdesktop-time')); + this._builder.get_object('show_showdesktop_time_spinbutton').set_value(this._settings.get_int('show-showdesktop-time')); + }); this._builder.get_object('show_showdesktop_width_spinbutton').set_value(this._settings.get_int('showdesktop-button-width')); this._builder.get_object('show_showdesktop_width_spinbutton').connect('value-changed', (widget) => { @@ -575,27 +607,6 @@ const Preferences = class { this._settings.set_int('show-showdesktop-time', widget.get_value()); }); - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings - this._settings.set_value('showdesktop-button-width', this._settings.get_default_value('showdesktop-button-width')); - this._builder.get_object('show_showdesktop_width_spinbutton').set_value(this._settings.get_int('showdesktop-button-width')); - - this._settings.set_value('show-showdesktop-hover', this._settings.get_default_value('show-showdesktop-hover')); - - this._settings.set_value('show-showdesktop-delay', this._settings.get_default_value('show-showdesktop-delay')); - this._builder.get_object('show_showdesktop_delay_spinbutton').set_value(this._settings.get_int('show-showdesktop-delay')); - - this._settings.set_value('show-showdesktop-time', this._settings.get_default_value('show-showdesktop-time')); - this._builder.get_object('show_showdesktop_time_spinbutton').set_value(this._settings.get_int('show-showdesktop-time')); - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(box); - dialog.destroy(); - } - return; - }); - dialog.show(); dialog.set_default_size(1, 1); } @@ -767,18 +778,41 @@ const Preferences = class { }); this._builder.get_object('dot_style_options_button').connect('clicked', () => { + let box = this._builder.get_object('box_dots_options'); - let dialog = new Gtk.Dialog({ title: _('Running Indicator Options'), - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); + let dialog = this._createPreferencesDialog(_('Running Indicator Options'), box, () => + { + // restore default settings + this._settings.set_value('dot-color-dominant', this._settings.get_default_value('dot-color-dominant')); + this._settings.set_value('dot-color-override', this._settings.get_default_value('dot-color-override')); + this._settings.set_value('dot-color-unfocused-different', this._settings.get_default_value('dot-color-unfocused-different')); - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); + this._settings.set_value('focus-highlight-color', this._settings.get_default_value('focus-highlight-color')); + let rgba = new Gdk.RGBA(); + rgba.parse(this._settings.get_string('focus-highlight-color')); + this._builder.get_object('focus_highlight_color_colorbutton').set_rgba(rgba); - let box = this._builder.get_object('box_dots_options'); - dialog.get_content_area().append(box); + this._settings.set_value('focus-highlight-opacity', this._settings.get_default_value('focus-highlight-opacity')); + this._builder.get_object('focus_highlight_opacity_spinbutton').set_value(this._settings.get_int('focus-highlight-opacity')); + + for (let i = 1; i <= MAX_WINDOW_INDICATOR; i++) { + this._settings.set_value('dot-color-' + i, this._settings.get_default_value('dot-color-' + i)); + rgba = new Gdk.RGBA(); + rgba.parse(this._settings.get_string('dot-color-' + i)); + this._builder.get_object('dot_color_' + i + '_colorbutton').set_rgba(rgba); + + this._settings.set_value('dot-color-unfocused-' + i, this._settings.get_default_value('dot-color-unfocused-' + i)); + rgba = new Gdk.RGBA(); + rgba.parse(this._settings.get_string('dot-color-unfocused-' + i)); + this._builder.get_object('dot_color_unfocused_' + i + '_colorbutton').set_rgba(rgba); + } + + this._settings.set_value('dot-size', this._settings.get_default_value('dot-size')); + this._builder.get_object('dot_size_spinbutton').set_value(this._settings.get_int('dot-size')); + + this._settings.set_value('focus-highlight', this._settings.get_default_value('focus-highlight')); + this._settings.set_value('focus-highlight-dominant', this._settings.get_default_value('focus-highlight-dominant')); + }); this._settings.bind('dot-color-dominant', this._builder.get_object('dot_color_dominant_switch'), @@ -870,47 +904,6 @@ const Preferences = class { this._settings.set_int('dot-size', widget.get_value()); }); - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings - this._settings.set_value('dot-color-dominant', this._settings.get_default_value('dot-color-dominant')); - this._settings.set_value('dot-color-override', this._settings.get_default_value('dot-color-override')); - this._settings.set_value('dot-color-unfocused-different', this._settings.get_default_value('dot-color-unfocused-different')); - - this._settings.set_value('focus-highlight-color', this._settings.get_default_value('focus-highlight-color')); - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('focus-highlight-color')); - this._builder.get_object('focus_highlight_color_colorbutton').set_rgba(rgba); - - this._settings.set_value('focus-highlight-opacity', this._settings.get_default_value('focus-highlight-opacity')); - this._builder.get_object('focus_highlight_opacity_spinbutton').set_value(this._settings.get_int('focus-highlight-opacity')); - - for (let i = 1; i <= MAX_WINDOW_INDICATOR; i++) { - this._settings.set_value('dot-color-' + i, this._settings.get_default_value('dot-color-' + i)); - rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('dot-color-' + i)); - this._builder.get_object('dot_color_' + i + '_colorbutton').set_rgba(rgba); - - this._settings.set_value('dot-color-unfocused-' + i, this._settings.get_default_value('dot-color-unfocused-' + i)); - rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('dot-color-unfocused-' + i)); - this._builder.get_object('dot_color_unfocused_' + i + '_colorbutton').set_rgba(rgba); - } - - this._settings.set_value('dot-size', this._settings.get_default_value('dot-size')); - this._builder.get_object('dot_size_spinbutton').set_value(this._settings.get_int('dot-size')); - - this._settings.set_value('focus-highlight', this._settings.get_default_value('focus-highlight')); - this._settings.set_value('focus-highlight-dominant', this._settings.get_default_value('focus-highlight-dominant')); - - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(box); - dialog.destroy(); - } - return; - }); - dialog.show(); dialog.set_default_size(1, 1); @@ -1114,20 +1107,10 @@ const Preferences = class { }); this._builder.get_object('trans_dyn_options_button').connect('clicked', () => { - let dialog = new Gtk.Dialog({ title: _('Dynamic opacity options'), - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); - - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); - let box = this._builder.get_object('box_dynamic_opacity_options'); - dialog.get_content_area().append(box); - dialog.connect('response', (dialog, id) => { - if (id == 1) { + let dialog = this._createPreferencesDialog(_('Dynamic opacity options'), box, () => + { // restore default settings this._settings.set_value('trans-dynamic-behavior', this._settings.get_default_value('trans-dynamic-behavior')); @@ -1139,12 +1122,6 @@ const Preferences = class { this._settings.set_value('trans-dynamic-anim-time', this._settings.get_default_value('trans-dynamic-anim-time')); this._builder.get_object('trans_options_anim_time_spinbutton').set_value(this._settings.get_int('trans-dynamic-anim-time')); - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(box); - dialog.destroy(); - } - return; }); dialog.show(); @@ -1258,49 +1235,33 @@ const Preferences = class { }); this._builder.get_object('intellihide_options_button').connect('clicked', () => { - let dialog = new Gtk.Dialog({ title: _('Intellihide options'), - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); - - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); - let box = this._builder.get_object('box_intellihide_options'); - dialog.get_content_area().append(box); - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings - this._settings.set_value('intellihide-hide-from-windows', this._settings.get_default_value('intellihide-hide-from-windows')); - this._settings.set_value('intellihide-behaviour', this._settings.get_default_value('intellihide-behaviour')); - this._settings.set_value('intellihide-use-pressure', this._settings.get_default_value('intellihide-use-pressure')); - this._settings.set_value('intellihide-show-in-fullscreen', this._settings.get_default_value('intellihide-show-in-fullscreen')); - this._settings.set_value('intellihide-only-secondary', this._settings.get_default_value('intellihide-only-secondary')); - - this._settings.set_value('intellihide-pressure-threshold', this._settings.get_default_value('intellihide-pressure-threshold')); - this._builder.get_object('intellihide_pressure_threshold_spinbutton').set_value(this._settings.get_int('intellihide-pressure-threshold')); - - this._settings.set_value('intellihide-pressure-time', this._settings.get_default_value('intellihide-pressure-time')); - this._builder.get_object('intellihide_pressure_time_spinbutton').set_value(this._settings.get_int('intellihide-pressure-time')); + let dialog = this._createPreferencesDialog(_('Intellihide options'), box, () => + { + // restore default settings + this._settings.set_value('intellihide-hide-from-windows', this._settings.get_default_value('intellihide-hide-from-windows')); + this._settings.set_value('intellihide-behaviour', this._settings.get_default_value('intellihide-behaviour')); + this._settings.set_value('intellihide-use-pressure', this._settings.get_default_value('intellihide-use-pressure')); + this._settings.set_value('intellihide-show-in-fullscreen', this._settings.get_default_value('intellihide-show-in-fullscreen')); + this._settings.set_value('intellihide-only-secondary', this._settings.get_default_value('intellihide-only-secondary')); + + this._settings.set_value('intellihide-pressure-threshold', this._settings.get_default_value('intellihide-pressure-threshold')); + this._builder.get_object('intellihide_pressure_threshold_spinbutton').set_value(this._settings.get_int('intellihide-pressure-threshold')); + + this._settings.set_value('intellihide-pressure-time', this._settings.get_default_value('intellihide-pressure-time')); + this._builder.get_object('intellihide_pressure_time_spinbutton').set_value(this._settings.get_int('intellihide-pressure-time')); - this._settings.set_value('intellihide-key-toggle-text', this._settings.get_default_value('intellihide-key-toggle-text')); + this._settings.set_value('intellihide-key-toggle-text', this._settings.get_default_value('intellihide-key-toggle-text')); - this._settings.set_value('intellihide-animation-time', this._settings.get_default_value('intellihide-animation-time')); - this._builder.get_object('intellihide_animation_time_spinbutton').set_value(this._settings.get_int('intellihide-animation-time')); + this._settings.set_value('intellihide-animation-time', this._settings.get_default_value('intellihide-animation-time')); + this._builder.get_object('intellihide_animation_time_spinbutton').set_value(this._settings.get_int('intellihide-animation-time')); - this._settings.set_value('intellihide-close-delay', this._settings.get_default_value('intellihide-close-delay')); - this._builder.get_object('intellihide_close_delay_spinbutton').set_value(this._settings.get_int('intellihide-close-delay')); + this._settings.set_value('intellihide-close-delay', this._settings.get_default_value('intellihide-close-delay')); + this._builder.get_object('intellihide_close_delay_spinbutton').set_value(this._settings.get_int('intellihide-close-delay')); - this._settings.set_value('intellihide-enable-start-delay', this._settings.get_default_value('intellihide-enable-start-delay')); - this._builder.get_object('intellihide_enable_start_delay_spinbutton').set_value(this._settings.get_int('intellihide-enable-start-delay')); - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(box); - dialog.destroy(); - } - return; + this._settings.set_value('intellihide-enable-start-delay', this._settings.get_default_value('intellihide-enable-start-delay')); + this._builder.get_object('intellihide_enable_start_delay_spinbutton').set_value(this._settings.get_int('intellihide-enable-start-delay')); }); dialog.show(); @@ -1380,19 +1341,70 @@ const Preferences = class { }); this._builder.get_object('show_window_previews_button').connect('clicked', () => { + let scrolledWindow = this._builder.get_object('box_window_preview_options'); - let dialog = new Gtk.Dialog({ title: _('Window preview options'), - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); + let dialog = this._createPreferencesDialog(_('Window preview options'), scrolledWindow, () => + { + // restore default settings + this._settings.set_value('show-window-previews-timeout', this._settings.get_default_value('show-window-previews-timeout')); + this._builder.get_object('preview_timeout_spinbutton').set_value(this._settings.get_int('show-window-previews-timeout')); - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); + this._settings.set_value('leave-timeout', this._settings.get_default_value('leave-timeout')); + this._builder.get_object('leave_timeout_spinbutton').set_value(this._settings.get_int('leave-timeout')); - let scrolledWindow = this._builder.get_object('box_window_preview_options'); + this._settings.set_value('window-preview-hide-immediate-click', this._settings.get_default_value('window-preview-hide-immediate-click')); + + this._settings.set_value('window-preview-animation-time', this._settings.get_default_value('window-preview-animation-time')); + this._builder.get_object('animation_time_spinbutton').set_value(this._settings.get_int('window-preview-animation-time')); + + this._settings.set_value('preview-use-custom-opacity', this._settings.get_default_value('preview-use-custom-opacity')); + + this._settings.set_value('window-preview-use-custom-icon-size', this._settings.get_default_value('window-preview-use-custom-icon-size')); - dialog.get_content_area().append(scrolledWindow); + this._settings.set_value('preview-custom-opacity', this._settings.get_default_value('preview-custom-opacity')); + this._builder.get_object('preview_custom_opacity_spinbutton').set_value(this._settings.get_int('preview-custom-opacity')); + + this._settings.set_value('window-preview-title-position', this._settings.get_default_value('window-preview-title-position')); + this._setPreviewTitlePosition(); + + this._settings.set_value('peek-mode', this._settings.get_default_value('peek-mode')); + this._settings.set_value('window-preview-show-title', this._settings.get_default_value('window-preview-show-title')); + this._settings.set_value('enter-peek-mode-timeout', this._settings.get_default_value('enter-peek-mode-timeout')); + this._builder.get_object('enter_peek_mode_timeout_spinbutton').set_value(this._settings.get_int('enter-peek-mode-timeout')); + this._settings.set_value('peek-mode-opacity', this._settings.get_default_value('peek-mode-opacity')); + this._builder.get_object('peek_mode_opacity_spinbutton').set_value(this._settings.get_int('peek-mode-opacity')); + + this._settings.set_value('window-preview-size', this._settings.get_default_value('window-preview-size')); + this._builder.get_object('preview_size_spinbutton').set_value(this._settings.get_int('window-preview-size')); + + this._settings.set_value('window-preview-fixed-x', this._settings.get_default_value('window-preview-fixed-x')); + this._settings.set_value('window-preview-fixed-y', this._settings.get_default_value('window-preview-fixed-y')); + + this._settings.set_value('window-preview-aspect-ratio-x', this._settings.get_default_value('window-preview-aspect-ratio-x')); + this._builder.get_object('preview_aspect_ratio_x_combo').set_active_id(this._settings.get_int('window-preview-aspect-ratio-x').toString()); + + this._settings.set_value('window-preview-aspect-ratio-y', this._settings.get_default_value('window-preview-aspect-ratio-y')); + this._builder.get_object('preview_aspect_ratio_y_combo').set_active_id(this._settings.get_int('window-preview-aspect-ratio-y').toString()); + + this._settings.set_value('window-preview-padding', this._settings.get_default_value('window-preview-padding')); + this._builder.get_object('preview_padding_spinbutton').set_value(this._settings.get_int('window-preview-padding')); + + this._settings.set_value('preview-middle-click-close', this._settings.get_default_value('preview-middle-click-close')); + + this._settings.set_value('window-preview-title-font-size', this._settings.get_default_value('window-preview-title-font-size')); + this._builder.get_object('preview_title_size_spinbutton').set_value(this._settings.get_int('window-preview-title-font-size')); + + this._settings.set_value('window-preview-custom-icon-size', this._settings.get_default_value('window-preview-custom-icon-size')); + this._builder.get_object('preview_custom_icon_size_spinbutton').set_value(this._settings.get_int('window-preview-custom-icon-size')); + + this._settings.set_value('window-preview-title-font-weight', this._settings.get_default_value('window-preview-title-font-weight')); + this._builder.get_object('grid_preview_title_weight_combo').set_active_id(this._settings.get_string('window-preview-title-font-weight')); + + this._settings.set_value('window-preview-title-font-color', this._settings.get_default_value('window-preview-title-font-color')); + let rgba = new Gdk.RGBA(); + rgba.parse(this._settings.get_string('window-preview-title-font-color')); + this._builder.get_object('grid_preview_title_font_color_colorbutton').set_rgba(rgba); + }); this._builder.get_object('preview_timeout_spinbutton').set_value(this._settings.get_int('show-window-previews-timeout')); this._builder.get_object('preview_timeout_spinbutton').connect('value-changed', (widget) => { @@ -1536,76 +1548,6 @@ const Preferences = class { this._builder.get_object('grid_preview_title_font_color_colorbutton').set_rgba(rgba); }).apply(this); - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings - this._settings.set_value('show-window-previews-timeout', this._settings.get_default_value('show-window-previews-timeout')); - this._builder.get_object('preview_timeout_spinbutton').set_value(this._settings.get_int('show-window-previews-timeout')); - - this._settings.set_value('leave-timeout', this._settings.get_default_value('leave-timeout')); - this._builder.get_object('leave_timeout_spinbutton').set_value(this._settings.get_int('leave-timeout')); - - this._settings.set_value('window-preview-hide-immediate-click', this._settings.get_default_value('window-preview-hide-immediate-click')); - - this._settings.set_value('window-preview-animation-time', this._settings.get_default_value('window-preview-animation-time')); - this._builder.get_object('animation_time_spinbutton').set_value(this._settings.get_int('window-preview-animation-time')); - - this._settings.set_value('preview-use-custom-opacity', this._settings.get_default_value('preview-use-custom-opacity')); - - this._settings.set_value('window-preview-use-custom-icon-size', this._settings.get_default_value('window-preview-use-custom-icon-size')); - - this._settings.set_value('preview-custom-opacity', this._settings.get_default_value('preview-custom-opacity')); - this._builder.get_object('preview_custom_opacity_spinbutton').set_value(this._settings.get_int('preview-custom-opacity')); - - this._settings.set_value('window-preview-title-position', this._settings.get_default_value('window-preview-title-position')); - this._setPreviewTitlePosition(); - - this._settings.set_value('peek-mode', this._settings.get_default_value('peek-mode')); - this._settings.set_value('window-preview-show-title', this._settings.get_default_value('window-preview-show-title')); - this._settings.set_value('enter-peek-mode-timeout', this._settings.get_default_value('enter-peek-mode-timeout')); - this._builder.get_object('enter_peek_mode_timeout_spinbutton').set_value(this._settings.get_int('enter-peek-mode-timeout')); - this._settings.set_value('peek-mode-opacity', this._settings.get_default_value('peek-mode-opacity')); - this._builder.get_object('peek_mode_opacity_spinbutton').set_value(this._settings.get_int('peek-mode-opacity')); - - this._settings.set_value('window-preview-size', this._settings.get_default_value('window-preview-size')); - this._builder.get_object('preview_size_spinbutton').set_value(this._settings.get_int('window-preview-size')); - - this._settings.set_value('window-preview-fixed-x', this._settings.get_default_value('window-preview-fixed-x')); - this._settings.set_value('window-preview-fixed-y', this._settings.get_default_value('window-preview-fixed-y')); - - this._settings.set_value('window-preview-aspect-ratio-x', this._settings.get_default_value('window-preview-aspect-ratio-x')); - this._builder.get_object('preview_aspect_ratio_x_combo').set_active_id(this._settings.get_int('window-preview-aspect-ratio-x').toString()); - - this._settings.set_value('window-preview-aspect-ratio-y', this._settings.get_default_value('window-preview-aspect-ratio-y')); - this._builder.get_object('preview_aspect_ratio_y_combo').set_active_id(this._settings.get_int('window-preview-aspect-ratio-y').toString()); - - this._settings.set_value('window-preview-padding', this._settings.get_default_value('window-preview-padding')); - this._builder.get_object('preview_padding_spinbutton').set_value(this._settings.get_int('window-preview-padding')); - - this._settings.set_value('preview-middle-click-close', this._settings.get_default_value('preview-middle-click-close')); - - this._settings.set_value('window-preview-title-font-size', this._settings.get_default_value('window-preview-title-font-size')); - this._builder.get_object('preview_title_size_spinbutton').set_value(this._settings.get_int('window-preview-title-font-size')); - - this._settings.set_value('window-preview-custom-icon-size', this._settings.get_default_value('window-preview-custom-icon-size')); - this._builder.get_object('preview_custom_icon_size_spinbutton').set_value(this._settings.get_int('window-preview-custom-icon-size')); - - this._settings.set_value('window-preview-title-font-weight', this._settings.get_default_value('window-preview-title-font-weight')); - this._builder.get_object('grid_preview_title_weight_combo').set_active_id(this._settings.get_string('window-preview-title-font-weight')); - - this._settings.set_value('window-preview-title-font-color', this._settings.get_default_value('window-preview-title-font-color')); - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('window-preview-title-font-color')); - this._builder.get_object('grid_preview_title_font_color_colorbutton').set_rgba(rgba); - - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(scrolledWindow); - dialog.destroy(); - } - return; - }); - dialog.show(); }); @@ -1675,17 +1617,34 @@ const Preferences = class { Gio.SettingsBindFlags.DEFAULT); this._builder.get_object('show_group_apps_options_button').connect('clicked', () => { - let dialog = new Gtk.Dialog({ title: _('Ungrouped application options'), - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); + let box = this._builder.get_object('box_group_apps_options'); - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); + let dialog = this._createPreferencesDialog(_('Ungrouped application options'), box, () => + { + // restore default settings + this._settings.set_value('group-apps-label-font-size', this._settings.get_default_value('group-apps-label-font-size')); + this._builder.get_object('group_apps_label_font_size_spinbutton').set_value(this._settings.get_int('group-apps-label-font-size')); - let box = this._builder.get_object('box_group_apps_options'); - dialog.get_content_area().append(box); + this._settings.set_value('group-apps-label-font-weight', this._settings.get_default_value('group-apps-label-font-weight')); + this._builder.get_object('group_apps_label_font_weight_combo').set_active_id(this._settings.get_string('group-apps-label-font-weight')); + + this._settings.set_value('group-apps-label-font-color', this._settings.get_default_value('group-apps-label-font-color')); + let rgba = new Gdk.RGBA(); + rgba.parse(this._settings.get_string('group-apps-label-font-color')); + this._builder.get_object('group_apps_label_font_color_colorbutton').set_rgba(rgba); + + this._settings.set_value('group-apps-label-font-color-minimized', this._settings.get_default_value('group-apps-label-font-color-minimized')); + let minimizedFontColor = new Gdk.RGBA(); + minimizedFontColor.parse(this._settings.get_string('group-apps-label-font-color-minimized')); + this._builder.get_object('group_apps_label_font_color_minimized_colorbutton').set_rgba(minimizedFontColor); + + this._settings.set_value('group-apps-label-max-width', this._settings.get_default_value('group-apps-label-max-width')); + this._builder.get_object('group_apps_label_max_width_spinbutton').set_value(this._settings.get_int('group-apps-label-max-width')); + + this._settings.set_value('group-apps-use-fixed-width', this._settings.get_default_value('group-apps-use-fixed-width')); + this._settings.set_value('group-apps-underline-unfocused', this._settings.get_default_value('group-apps-underline-unfocused')); + this._settings.set_value('group-apps-use-launchers', this._settings.get_default_value('group-apps-use-launchers')); + }); this._builder.get_object('group_apps_label_font_size_spinbutton').set_value(this._settings.get_int('group-apps-label-font-size')); this._builder.get_object('group_apps_label_font_size_spinbutton').connect('value-changed', (widget) => { @@ -1714,39 +1673,6 @@ const Preferences = class { this._settings.set_int('group-apps-label-max-width', widget.get_value()); }); - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings - this._settings.set_value('group-apps-label-font-size', this._settings.get_default_value('group-apps-label-font-size')); - this._builder.get_object('group_apps_label_font_size_spinbutton').set_value(this._settings.get_int('group-apps-label-font-size')); - - this._settings.set_value('group-apps-label-font-weight', this._settings.get_default_value('group-apps-label-font-weight')); - this._builder.get_object('group_apps_label_font_weight_combo').set_active_id(this._settings.get_string('group-apps-label-font-weight')); - - this._settings.set_value('group-apps-label-font-color', this._settings.get_default_value('group-apps-label-font-color')); - let rgba = new Gdk.RGBA(); - rgba.parse(this._settings.get_string('group-apps-label-font-color')); - this._builder.get_object('group_apps_label_font_color_colorbutton').set_rgba(rgba); - - this._settings.set_value('group-apps-label-font-color-minimized', this._settings.get_default_value('group-apps-label-font-color-minimized')); - let minimizedFontColor = new Gdk.RGBA(); - minimizedFontColor.parse(this._settings.get_string('group-apps-label-font-color-minimized')); - this._builder.get_object('group_apps_label_font_color_minimized_colorbutton').set_rgba(minimizedFontColor); - - this._settings.set_value('group-apps-label-max-width', this._settings.get_default_value('group-apps-label-max-width')); - this._builder.get_object('group_apps_label_max_width_spinbutton').set_value(this._settings.get_int('group-apps-label-max-width')); - - this._settings.set_value('group-apps-use-fixed-width', this._settings.get_default_value('group-apps-use-fixed-width')); - this._settings.set_value('group-apps-underline-unfocused', this._settings.get_default_value('group-apps-underline-unfocused')); - this._settings.set_value('group-apps-use-launchers', this._settings.get_default_value('group-apps-use-launchers')); - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(box); - dialog.destroy(); - } - return; - }); - dialog.show(); dialog.set_default_size(600, 1); @@ -1770,18 +1696,19 @@ const Preferences = class { // Create dialog for middle-click options this._builder.get_object('middle_click_options_button').connect('clicked', () => { - - let dialog = new Gtk.Dialog({ title: _('Customize middle-click behavior'), - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); - - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); - let box = this._builder.get_object('box_middle_click_options'); - dialog.get_content_area().append(box); + + let dialog = this._createPreferencesDialog(_('Customize middle-click behavior'), box, () => + { + // restore default settings for the relevant keys + let keys = ['shift-click-action', 'middle-click-action', 'shift-middle-click-action']; + keys.forEach(function(val) { + this._settings.set_value(val, this._settings.get_default_value(val)); + }, this); + this._builder.get_object('shift_click_action_combo').set_active_id(this._settings.get_string('shift-click-action')); + this._builder.get_object('middle_click_action_combo').set_active_id(this._settings.get_string('middle-click-action')); + this._builder.get_object('shift_middle_click_action_combo').set_active_id(this._settings.get_string('shift-middle-click-action')); + }); this._builder.get_object('shift_click_action_combo').set_active_id(this._settings.get_string('shift-click-action')); @@ -1802,24 +1729,6 @@ const Preferences = class { 'active-id', Gio.SettingsBindFlags.DEFAULT); - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings for the relevant keys - let keys = ['shift-click-action', 'middle-click-action', 'shift-middle-click-action']; - keys.forEach(function(val) { - this._settings.set_value(val, this._settings.get_default_value(val)); - }, this); - this._builder.get_object('shift_click_action_combo').set_active_id(this._settings.get_string('shift-click-action')); - this._builder.get_object('middle_click_action_combo').set_active_id(this._settings.get_string('middle-click-action')); - this._builder.get_object('shift_middle_click_action_combo').set_active_id(this._settings.get_string('shift-middle-click-action')); - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(box); - dialog.destroy(); - } - return; - }); - dialog.show(); dialog.set_default_size(700, 1); @@ -1837,17 +1746,16 @@ const Preferences = class { // Create dialog for panel scroll options this._builder.get_object('scroll_panel_options_button').connect('clicked', () => { - let dialog = new Gtk.Dialog({ title: _('Customize panel scroll behavior'), - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); + let box = this._builder.get_object('scroll_panel_options_box'); - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); + let dialog = this._createPreferencesDialog(_('Customize panel scroll behavior'), box, () => + { + // restore default settings + this._settings.set_value('scroll-panel-delay', this._settings.get_default_value('scroll-panel-delay')); + this._builder.get_object('scroll_panel_options_delay_spinbutton').set_value(this._settings.get_int('scroll-panel-delay')); - let box = this._builder.get_object('scroll_panel_options_box'); - dialog.get_content_area().append(box); + this._settings.set_value('scroll-panel-show-ws-popup', this._settings.get_default_value('scroll-panel-show-ws-popup')); + }); this._builder.get_object('scroll_panel_options_delay_spinbutton').set_value(this._settings.get_int('scroll-panel-delay')); this._builder.get_object('scroll_panel_options_delay_spinbutton').connect('value-changed', (widget) => { @@ -1859,21 +1767,6 @@ const Preferences = class { 'active', Gio.SettingsBindFlags.DEFAULT); - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings - this._settings.set_value('scroll-panel-delay', this._settings.get_default_value('scroll-panel-delay')); - this._builder.get_object('scroll_panel_options_delay_spinbutton').set_value(this._settings.get_int('scroll-panel-delay')); - - this._settings.set_value('scroll-panel-show-ws-popup', this._settings.get_default_value('scroll-panel-show-ws-popup')); - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(box); - dialog.destroy(); - } - return; - }); - dialog.show(); dialog.set_default_size(640, 1); @@ -1881,36 +1774,20 @@ const Preferences = class { // Create dialog for icon scroll options this._builder.get_object('scroll_icon_options_button').connect('clicked', () => { - let dialog = new Gtk.Dialog({ title: _('Customize icon scroll behavior'), - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); - - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); - let box = this._builder.get_object('scroll_icon_options_box'); - dialog.get_content_area().append(box); + + let dialog = this._createPreferencesDialog(_('Customize icon scroll behavior'), box, () => + { + // restore default settings + this._settings.set_value('scroll-icon-delay', this._settings.get_default_value('scroll-icon-delay')); + this._builder.get_object('scroll_icon_options_delay_spinbutton').set_value(this._settings.get_int('scroll-icon-delay')); + }); this._builder.get_object('scroll_icon_options_delay_spinbutton').set_value(this._settings.get_int('scroll-icon-delay')); this._builder.get_object('scroll_icon_options_delay_spinbutton').connect('value-changed', (widget) => { this._settings.set_int('scroll-icon-delay', widget.get_value()); }); - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings - this._settings.set_value('scroll-icon-delay', this._settings.get_default_value('scroll-icon-delay')); - this._builder.get_object('scroll_icon_options_delay_spinbutton').set_value(this._settings.get_int('scroll-icon-delay')); - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(box); - dialog.destroy(); - } - return; - }); - dialog.show(); dialog.set_default_size(640, 1); @@ -1978,32 +1855,15 @@ const Preferences = class { // Create dialog for number overlay options this._builder.get_object('overlay_button').connect('clicked', () => { - - let dialog = new Gtk.Dialog({ title: _('Advanced hotkeys options'), - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); - - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); - let box = this._builder.get_object('box_overlay_shortcut'); - dialog.get_content_area().append(box); - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings for the relevant keys - let keys = ['hotkey-prefix-text', 'shortcut-text', 'hotkeys-overlay-combo', 'overlay-timeout', 'shortcut-previews']; - keys.forEach(function(val) { - this._settings.set_value(val, this._settings.get_default_value(val)); - }, this); - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(box); - dialog.destroy(); - } - return; + let dialog = this._createPreferencesDialog(_('Advanced hotkeys options'), box, () => + { + // restore default settings for the relevant keys + let keys = ['hotkey-prefix-text', 'shortcut-text', 'hotkeys-overlay-combo', 'overlay-timeout', 'shortcut-previews']; + keys.forEach(function(val) { + this._settings.set_value(val, this._settings.get_default_value(val)); + }, this); }); dialog.show(); @@ -2013,18 +1873,14 @@ const Preferences = class { // setup dialog for secondary menu options this._builder.get_object('secondarymenu_options_button').connect('clicked', () => { - - let dialog = new Gtk.Dialog({ title: _('Secondary Menu Options'), - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); - - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); - let box = this._builder.get_object('box_secondarymenu_options'); - dialog.get_content_area().append(box); + + let dialog = this._createPreferencesDialog(_('Secondary Menu Options'), box, () => + { + // restore default settings + this._settings.set_value('secondarymenu-contains-appmenu', this._settings.get_default_value('secondarymenu-contains-appmenu')); + this._settings.set_value('secondarymenu-contains-showdetails', this._settings.get_default_value('secondarymenu-contains-showdetails')); + }); this._settings.bind('secondarymenu-contains-appmenu', this._builder.get_object('secondarymenu_appmenu_switch'), @@ -2036,19 +1892,6 @@ const Preferences = class { 'active', Gio.SettingsBindFlags.DEFAULT); - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings - this._settings.set_value('secondarymenu-contains-appmenu', this._settings.get_default_value('secondarymenu-contains-appmenu')); - this._settings.set_value('secondarymenu-contains-showdetails', this._settings.get_default_value('secondarymenu-contains-showdetails')); - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(box); - dialog.destroy(); - } - return; - }); - dialog.show(); dialog.set_default_size(480, 1); @@ -2056,30 +1899,10 @@ const Preferences = class { // setup dialog for advanced options this._builder.get_object('button_advanced_options').connect('clicked', () => { - - let dialog = new Gtk.Dialog({ title: _('Advanced Options'), - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); - - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); - + print("nj"); let box = this._builder.get_object('box_advanced_options'); - dialog.get_content_area().append(box); - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings - - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(box); - dialog.destroy(); - } - return; - }); + let dialog = this._createPreferencesDialog(_('Advanced Options'), box); dialog.show(); dialog.set_default_size(480, 1); @@ -2193,34 +2016,19 @@ const Preferences = class { } this._builder.get_object('animate_appicon_hover_button').connect('clicked', () => { - let dialog = new Gtk.Dialog({ title: _('App icon animation options'), - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); - - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - dialog.add_button(_('Reset to defaults'), 1); - + print("BB"); let box = this._builder.get_object('animate_appicon_hover_options'); - dialog.get_content_area().append(box); - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings - this._settings.set_value('animate-appicon-hover-animation-type', this._settings.get_default_value('animate-appicon-hover-animation-type')); - this._settings.set_value('animate-appicon-hover-animation-duration', this._settings.get_default_value('animate-appicon-hover-animation-duration')); - this._settings.set_value('animate-appicon-hover-animation-rotation', this._settings.get_default_value('animate-appicon-hover-animation-rotation')); - this._settings.set_value('animate-appicon-hover-animation-travel', this._settings.get_default_value('animate-appicon-hover-animation-travel')); - this._settings.set_value('animate-appicon-hover-animation-zoom', this._settings.get_default_value('animate-appicon-hover-animation-zoom')); - this._settings.set_value('animate-appicon-hover-animation-convexity', this._settings.get_default_value('animate-appicon-hover-animation-convexity')); - this._settings.set_value('animate-appicon-hover-animation-extent', this._settings.get_default_value('animate-appicon-hover-animation-extent')); - } else { - // remove the settings box so it doesn't get destroyed; - dialog.get_content_area().remove(box); - dialog.destroy(); - } - return; + let dialog = this._createPreferencesDialog(_('App icon animation options'), box, () => + { + // restore default settings + this._settings.set_value('animate-appicon-hover-animation-type', this._settings.get_default_value('animate-appicon-hover-animation-type')); + this._settings.set_value('animate-appicon-hover-animation-duration', this._settings.get_default_value('animate-appicon-hover-animation-duration')); + this._settings.set_value('animate-appicon-hover-animation-rotation', this._settings.get_default_value('animate-appicon-hover-animation-rotation')); + this._settings.set_value('animate-appicon-hover-animation-travel', this._settings.get_default_value('animate-appicon-hover-animation-travel')); + this._settings.set_value('animate-appicon-hover-animation-zoom', this._settings.get_default_value('animate-appicon-hover-animation-zoom')); + this._settings.set_value('animate-appicon-hover-animation-convexity', this._settings.get_default_value('animate-appicon-hover-animation-convexity')); + this._settings.set_value('animate-appicon-hover-animation-extent', this._settings.get_default_value('animate-appicon-hover-animation-extent')); }); dialog.show(); From 53717709156570a3de5e111e40d0577f153b48b9 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Thu, 7 Apr 2022 20:38:04 +0200 Subject: [PATCH 27/62] enable prefs dialog search, fix sensitive flag of opacity and gradiant rows --- prefs.js | 17 +++++++++++++++++ ui/SettingsStyle.ui | 8 ++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/prefs.js b/prefs.js index 02d7997d..cff63e48 100644 --- a/prefs.js +++ b/prefs.js @@ -166,6 +166,9 @@ const Preferences = class { this._builder.set_translation_domain(Me.metadata['gettext-domain']); if (window) { + this._window = window; + window.set_search_enabled(true); + // dialogs this._builder.add_from_file(Me.path + '/ui/AnimateAppIconHoverOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxDotOptions.ui'); @@ -1026,6 +1029,13 @@ const Preferences = class { 'sensitive', Gio.SettingsBindFlags.DEFAULT); + if (this._window) { + this._settings.bind('trans-use-custom-opacity', + this._builder.get_object('trans_opacity_box2'), + 'sensitive', + Gio.SettingsBindFlags.DEFAULT); + } + this._builder.get_object('trans_opacity_override_switch').connect('notify::active', (widget) => { if (!widget.get_active()) this._builder.get_object('trans_dyn_switch').set_active(false); @@ -1061,6 +1071,13 @@ const Preferences = class { 'sensitive', Gio.SettingsBindFlags.DEFAULT); + if (this._window) { + this._settings.bind('trans-use-custom-gradient', + this._builder.get_object('trans_gradient_box2'), + 'sensitive', + Gio.SettingsBindFlags.DEFAULT); + } + rgba.parse(this._settings.get_string('trans-gradient-top-color')); this._builder.get_object('trans_gradient_color1_colorbutton').set_rgba(rgba); diff --git a/ui/SettingsStyle.ui b/ui/SettingsStyle.ui index a97a936f..b2ae021b 100644 --- a/ui/SettingsStyle.ui +++ b/ui/SettingsStyle.ui @@ -251,7 +251,7 @@ - + Panel background opacity (%) @@ -264,7 +264,7 @@ - + Dynamic background opacity Change opacity when a window gets close to the panel @@ -309,7 +309,7 @@ - + Gradient top color and opacity (%) @@ -328,7 +328,7 @@ - + Gradient bottom color and opacity (%) From e031805d25d00d7ceab196f05d13620977b87c31 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Fri, 8 Apr 2022 23:07:55 +0200 Subject: [PATCH 28/62] fix row order and some strings in behavior page --- ui/SettingsBehavior.ui | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/SettingsBehavior.ui b/ui/SettingsBehavior.ui index d5dbf951..6f50fa8b 100644 --- a/ui/SettingsBehavior.ui +++ b/ui/SettingsBehavior.ui @@ -23,9 +23,9 @@ - Show running applications + Show favorite applications on secondary panels - + center @@ -34,9 +34,9 @@ - Show favorite applications on secondary panels + Show running applications - + center @@ -45,7 +45,7 @@ - Show favorite applications + Show <i>AppMenu</i> button Top Bar > Show App Menu must be enabled in Tweak Tool From 9525de6b1d9422f736ff9b4eca772f57c121b570 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Fri, 8 Apr 2022 23:26:06 +0200 Subject: [PATCH 29/62] update pages icons --- ui/SettingsAbout.ui | 2 +- ui/SettingsAction.ui | 2 +- ui/SettingsBehavior.ui | 2 +- ui/SettingsFineTune.ui | 2 +- ui/SettingsPosition.ui | 2 +- ui/SettingsStyle.ui | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/SettingsAbout.ui b/ui/SettingsAbout.ui index 73c23bdb..caeb2755 100644 --- a/ui/SettingsAbout.ui +++ b/ui/SettingsAbout.ui @@ -4,7 +4,7 @@ About - document-properties + help-about diff --git a/ui/SettingsAction.ui b/ui/SettingsAction.ui index 3b2ec4c6..c552d1ea 100644 --- a/ui/SettingsAction.ui +++ b/ui/SettingsAction.ui @@ -4,7 +4,7 @@ Action - document-properties + view-pin diff --git a/ui/SettingsBehavior.ui b/ui/SettingsBehavior.ui index 6f50fa8b..9ea25601 100644 --- a/ui/SettingsBehavior.ui +++ b/ui/SettingsBehavior.ui @@ -3,7 +3,7 @@ Behavior - document-properties + visible diff --git a/ui/SettingsFineTune.ui b/ui/SettingsFineTune.ui index 29126ee5..61fd0768 100644 --- a/ui/SettingsFineTune.ui +++ b/ui/SettingsFineTune.ui @@ -39,7 +39,7 @@ Fine-Tune - document-properties + color-select diff --git a/ui/SettingsPosition.ui b/ui/SettingsPosition.ui index fd01180d..d31f9727 100644 --- a/ui/SettingsPosition.ui +++ b/ui/SettingsPosition.ui @@ -17,7 +17,7 @@ Position - document-properties + find-location diff --git a/ui/SettingsStyle.ui b/ui/SettingsStyle.ui index b2ae021b..cdf525b4 100644 --- a/ui/SettingsStyle.ui +++ b/ui/SettingsStyle.ui @@ -36,7 +36,7 @@ Style - document-properties + image-adjust-color From 9fe030ec357f4aa2479a327eeb5ddfe90a774964 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 00:04:04 +0200 Subject: [PATCH 30/62] migrate box show desktop options to adw preferences group --- prefs.js | 12 +- ui/BoxShowDesktopOptions.ui | 284 +++++++++++------------------------- 2 files changed, 96 insertions(+), 200 deletions(-) diff --git a/prefs.js b/prefs.js index cff63e48..8c8c6dbf 100644 --- a/prefs.js +++ b/prefs.js @@ -245,7 +245,10 @@ const Preferences = class { let isVertical = position == Pos.LEFT || position == Pos.RIGHT; let showDesktopWidthLabel = this._builder.get_object('show_showdesktop_width_label'); - showDesktopWidthLabel.set_text(isVertical ? _('Show Desktop button height (px)') : _('Show Desktop button width (px)')); + if(this._window) + showDesktopWidthLabel.set_title(isVertical ? _('Show Desktop button height (px)') : _('Show Desktop button width (px)')); + else + showDesktopWidthLabel.set_text(isVertical ? _('Show Desktop button height (px)') : _('Show Desktop button width (px)')); this._displayPanelPositionsForMonitor(this._currentMonitorIndex); } @@ -1308,6 +1311,13 @@ const Preferences = class { 'sensitive', Gio.SettingsBindFlags.DEFAULT); + if(this._window) { + this._settings.bind('show-showdesktop-hover', + this._builder.get_object('grid_show_showdesktop_hide_options2'), + 'sensitive', + Gio.SettingsBindFlags.DEFAULT); + } + this._settings.bind('show-appmenu', this._builder.get_object('show_appmenu_switch'), 'active', diff --git a/ui/BoxShowDesktopOptions.ui b/ui/BoxShowDesktopOptions.ui index 8b976db5..f212d847 100644 --- a/ui/BoxShowDesktopOptions.ui +++ b/ui/BoxShowDesktopOptions.ui @@ -22,222 +22,108 @@ - True - False vertical + 600 + 8 + - - True - False - none - 1 - 1 + + 8 + 8 + 8 + - - True - True + - - True - False - 12 - 12 - 12 - 12 - 4 - 32 - - - True - False - True - 0 - - 0 - 0 - - - - - - True - True - end - 4 - 1 - show_showdesktop_width_adjustment - True - 1 - - 0 - 1 - - - - - - True - False - True - Override Show Desktop line color - 0 - - 1 - 0 - - - - - - True - False - 12 - end - - - True - True - True - end - True - - - - - True - True - end - center - - - - 1 - 1 - - - + + center + 4 + 1 + show_showdesktop_width_adjustment + True + 1 + - - True - True + + Override Show Desktop line color - + > + True + center + True + + + + + center + + + + + + + + + + + 8 + 8 + 8 + + + + Reveal the desktop when hovering the Show Desktop button + + + True - False - 12 - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Reveal the desktop when hovering the Show Desktop button - True - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - - - - True - False - 4 - - - True - False - True - Delay before revealing the desktop (ms) - True - 0 - - 0 - 0 - - - - - - True - True - end - 4 - 1 - show_showdesktop_delay_adjustment - True - 1 - - 0 - 1 - - - - - - True - False - True - Fade duration (ms) - True - 0 - - 1 - 0 - - - - - - True - True - end - 4 - 1 - show_showdesktop_time_adjustment - True - 1 - - 1 - 1 - - - - - 1 - 0 - 2 - - - + True + end + center + + + + Delay before revealing the desktop (ms) + + + center + 4 + 1 + show_showdesktop_delay_adjustment + True + 1 + + + + + + + + Fade duration (ms) + + + center + 4 + 1 + show_showdesktop_time_adjustment + True + 1 + + + + + + \ No newline at end of file From 99f776a33870c2f41f30e6cd27d5d215bab745df Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 00:37:24 +0200 Subject: [PATCH 31/62] migrate box advanced options to adw preferences group, harmonised box dialog file names --- prefs.js | 9 ++-- ui/BoxAdvancedOptions.ui | 42 ++++++------------- ...ns.ui => BoxAnimateAppIconHoverOptions.ui} | 0 ...nOptionsBox.ui => BoxScrollIconOptions.ui} | 0 ...OptionsBox.ui => BoxScrollPanelOptions.ui} | 0 ...tions.ui => BoxShowApplicationsOptions.ui} | 0 ui/BoxShowDesktopOptions.ui | 1 - 7 files changed, 17 insertions(+), 35 deletions(-) rename ui/{AnimateAppIconHoverOptions.ui => BoxAnimateAppIconHoverOptions.ui} (100%) rename ui/{ScrollIconOptionsBox.ui => BoxScrollIconOptions.ui} (100%) rename ui/{ScrollPanelOptionsBox.ui => BoxScrollPanelOptions.ui} (100%) rename ui/{ShowApplicationsOptions.ui => BoxShowApplicationsOptions.ui} (100%) diff --git a/prefs.js b/prefs.js index 8c8c6dbf..10d7e61c 100644 --- a/prefs.js +++ b/prefs.js @@ -170,19 +170,19 @@ const Preferences = class { window.set_search_enabled(true); // dialogs - this._builder.add_from_file(Me.path + '/ui/AnimateAppIconHoverOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxAnimateAppIconHoverOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxDotOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxShowDesktopOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxDynamicOpacityOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxIntellihideOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/ShowApplicationsOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxShowApplicationsOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxWindowPreviewOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxGroupAppsOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxMiddleClickOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxOverlayShortcut.ui'); this._builder.add_from_file(Me.path + '/ui/BoxSecondaryMenuOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/ScrollPanelOptionsBox.ui'); - this._builder.add_from_file(Me.path + '/ui/ScrollIconOptionsBox.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxScrollPanelOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxScrollIconOptions.ui'); this._builder.add_from_file(Me.path + '/ui/BoxAdvancedOptions.ui'); // pages @@ -1926,7 +1926,6 @@ const Preferences = class { // setup dialog for advanced options this._builder.get_object('button_advanced_options').connect('clicked', () => { - print("nj"); let box = this._builder.get_object('box_advanced_options'); let dialog = this._createPreferencesDialog(_('Advanced Options'), box); diff --git a/ui/BoxAdvancedOptions.ui b/ui/BoxAdvancedOptions.ui index fd71fc04..0cfb87d7 100644 --- a/ui/BoxAdvancedOptions.ui +++ b/ui/BoxAdvancedOptions.ui @@ -3,40 +3,24 @@ - True - False vertical - 1 - 1 + 600 + 8 + - - True - False - 0 + + 8 + 8 + 8 + 8 + - - True - False - none - - - 100 - 80 - True - True - - - True - False - True - Nothing yet! - True - - - - + + Nothing yet! + For real... + diff --git a/ui/AnimateAppIconHoverOptions.ui b/ui/BoxAnimateAppIconHoverOptions.ui similarity index 100% rename from ui/AnimateAppIconHoverOptions.ui rename to ui/BoxAnimateAppIconHoverOptions.ui diff --git a/ui/ScrollIconOptionsBox.ui b/ui/BoxScrollIconOptions.ui similarity index 100% rename from ui/ScrollIconOptionsBox.ui rename to ui/BoxScrollIconOptions.ui diff --git a/ui/ScrollPanelOptionsBox.ui b/ui/BoxScrollPanelOptions.ui similarity index 100% rename from ui/ScrollPanelOptionsBox.ui rename to ui/BoxScrollPanelOptions.ui diff --git a/ui/ShowApplicationsOptions.ui b/ui/BoxShowApplicationsOptions.ui similarity index 100% rename from ui/ShowApplicationsOptions.ui rename to ui/BoxShowApplicationsOptions.ui diff --git a/ui/BoxShowDesktopOptions.ui b/ui/BoxShowDesktopOptions.ui index f212d847..8319b7ee 100644 --- a/ui/BoxShowDesktopOptions.ui +++ b/ui/BoxShowDesktopOptions.ui @@ -77,7 +77,6 @@ Reveal the desktop when hovering the Show Desktop button - True From 85c252d8ed79e6f2c6188aca0699e2113358f308 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 01:00:27 +0200 Subject: [PATCH 32/62] migrate box animate app icon hover options to adw preferences group --- ui/BoxAdvancedOptions.ui | 12 +- ui/BoxAnimateAppIconHoverOptions.ui | 214 +++++++--------------------- ui/SettingsFineTune.ui | 4 - 3 files changed, 61 insertions(+), 169 deletions(-) diff --git a/ui/BoxAdvancedOptions.ui b/ui/BoxAdvancedOptions.ui index 0cfb87d7..d80a52e8 100644 --- a/ui/BoxAdvancedOptions.ui +++ b/ui/BoxAdvancedOptions.ui @@ -5,17 +5,17 @@ vertical 600 - 8 + 12 - 8 - 8 - 8 - 8 + 12 + 12 + 12 + 12 - + Nothing yet! For real... diff --git a/ui/BoxAnimateAppIconHoverOptions.ui b/ui/BoxAnimateAppIconHoverOptions.ui index 28f7ad14..2babe5ac 100644 --- a/ui/BoxAnimateAppIconHoverOptions.ui +++ b/ui/BoxAnimateAppIconHoverOptions.ui @@ -46,37 +46,21 @@ - True - False vertical - 1 - 1 + 600 + 12 + - - True - True - False + + 12 + 12 + 12 + - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Animation type - 0 - - + + Animation type - True False center @@ -88,72 +72,38 @@ + + - - True - True - False + + 12 + 12 + 12 + - - True - False - 12 - 12 - 12 - 12 - 24 - 32 - - - True - False - 12 - Duration - True - 0 - end - - 0 - 0 - - - + + Duration - True - True - end + center True animate_appicon_hover_options_duration_adjustment 0 0 right True - - 0 - 1 - - - - - - True - False - Rotation - 0 - end - - 1 - 0 - + + + + + + Rotation - True - True end True animate_appicon_hover_options_rotation_adjustment @@ -161,89 +111,50 @@ 0 right True - - 1 - 1 - - - - - - True - False - Travel - 0 - end - - 2 - 0 - + + + + + + Travel - True - True - end + center True animate_appicon_hover_options_travel_adjustment 0 0 right True - - 2 - 1 - - - - - - True - False - Zoom - 0 - end - - 3 - 0 - + + + + + + Zoom - True - True - end + center True animate_appicon_hover_options_zoom_adjustment 0 0 right True - - 3 - 1 - - - - - - True - False - Convexity - 0 - end - - 4 - 0 - + + + + + + Convexity - True - True end True animate_appicon_hover_options_convexity_adjustment @@ -251,46 +162,31 @@ 1 right True - - 4 - 1 - - - - - - True - False - Extent - 0 - end - - 5 - 0 - + + + + + + Extent - True - True - end + center True animate_appicon_hover_options_extent_adjustment 0 0 right True - - 5 - 1 - + + \ No newline at end of file diff --git a/ui/SettingsFineTune.ui b/ui/SettingsFineTune.ui index 61fd0768..34eb1a52 100644 --- a/ui/SettingsFineTune.ui +++ b/ui/SettingsFineTune.ui @@ -52,8 +52,6 @@ (0 = theme default) - True - True baseline True tray_size_adjustment @@ -73,8 +71,6 @@ (0 = theme default) - True - True baseline True leftbox_size_adjustment From fcf1cd10c1ef25ba243d1fad359803fd276ac069 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 01:58:58 +0200 Subject: [PATCH 33/62] migrate box dot options to adw preferences group --- prefs.js | 1 - ui/BoxDotOptions.ui | 776 ++++++++++++++------------------------------ 2 files changed, 240 insertions(+), 537 deletions(-) diff --git a/prefs.js b/prefs.js index 10d7e61c..1a400351 100644 --- a/prefs.js +++ b/prefs.js @@ -2042,7 +2042,6 @@ const Preferences = class { } this._builder.get_object('animate_appicon_hover_button').connect('clicked', () => { - print("BB"); let box = this._builder.get_object('animate_appicon_hover_options'); let dialog = this._createPreferencesDialog(_('App icon animation options'), box, () => diff --git a/ui/BoxDotOptions.ui b/ui/BoxDotOptions.ui index d75e3375..fb95737d 100644 --- a/ui/BoxDotOptions.ui +++ b/ui/BoxDotOptions.ui @@ -15,571 +15,275 @@ 5 - - True - False - 12 - 12 - vertical - 1 - 1 + + 600 + 600 + True - - True - False - 12 - 12 - 12 - 12 - 0 + + + vertical + 12 + + + + 12 + 12 + 12 + + + + Highlight focused application + + + center + + + + + + + + + + + 12 + 12 + 12 + + + + Icon dominant color + + + center + + + + + + + + Custom color + + + center + + + + + + + + Highlight opacity + + + center + 5 + focus_highlight_opacity_adjustment + 5 + + + + + + + + + + + 12 + 12 + 12 + + + + Indicator size (px) + + + center + 0 + dot_size_adjustment + + + + + + + + Indicator color - Icon Dominant + + + center + + + + + + + + + + + 12 + 12 + 12 + + + + Indicator color - Override Theme + + + center + + + + + + + + + + 12 + 12 + 12 + + + + 1 window open (or ungrouped) + + + center + Apply to all + + + + + center + + + + + + + + 2 windows open + + + center + + + + + + + + 3 windows open + + + center + + + + + + + + 4+ windows open + + + center + + + + + + + + + + + 12 + 12 + 12 + + + + Use different for unfocused + + + center + + + + + + + + + - - True - False - none + + 12 + 12 + 12 + 12 + - - 100 - True - True + + 1 window open (or ungrouped) + + + center + Apply to all + + - - True - False - 12 - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Highlight focused application - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - - - - True - False - 12 - 8 - - - True - False - True - Icon dominant color - 0 - - 0 - 0 - - - - - - True - True - end - center - - - - - True - False - True - Custom color - 0 - - 1 - 0 - - - - - - True - True - True - end - - 1 - 1 - - - - - - True - False - True - Highlight opacity - 0 - - 2 - 0 - - - - - - True - True - end - 5 - focus_highlight_opacity_adjustment - 5 - - 2 - 1 - - - - - 1 - 0 - 2 - - - + + center + - - 100 - True - True + + 2 windows open - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Indicator size (px) - 0 - - 0 - 0 - - - - - - True - True - end - 0 - dot_size_adjustment - - 0 - 1 - - - + + center + - - 100 - True - True + + 3 windows open - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Indicator color - Icon Dominant - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - + + center + - - 100 - 80 - True - True + + 4+ windows open - - True - False - 12 - 12 - vertical - - - True - False - - - True - False - True - Indicator color - Override Theme - 0 - - - - - True - True - end - center - - - - - - - True - False - 12 - 12 - 12 - 4 - 32 - - - True - False - True - 1 window open (or ungrouped) - 0 - - 0 - 0 - - - - - - True - False - end - - - Apply to all - True - True - True - - - - - True - True - True - end - - - - 0 - 1 - - - - - - True - False - True - 2 windows open - 0 - - 1 - 0 - - - - - - True - False - True - 3 windows open - 0 - - 2 - 0 - - - - - - True - False - True - 4+ windows open - 0 - - 3 - 0 - - - - - - True - True - True - end - - 1 - 1 - - - - - - True - True - True - end - - 2 - 1 - - - - - - True - True - True - end - - 3 - 1 - - - - - - - - True - False - vertical - - - True - False - 12 - - - True - False - True - Use different for unfocused - 0 - - - - - True - True - end - center - - - - - - - True - False - 12 - 12 - 12 - 4 - 32 - - - True - False - True - 1 window open (or ungrouped) - 0 - - 0 - 0 - - - - - - True - False - end - - - Apply to all - True - True - True - - - - - True - True - True - end - - - - 0 - 1 - - - - - - True - False - True - 2 windows open - 0 - - 1 - 0 - - - - - - True - True - True - end - - 1 - 1 - - - - - - True - False - True - 3 windows open - 0 - - 2 - 0 - - - - - - True - True - True - end - - 2 - 1 - - - - - - True - False - True - 4+ windows open - 0 - - 3 - 0 - - - - - - True - True - True - end - - 3 - 1 - - - - - - - + + center + + + From 6b0d24f1a5aeea86f9b6a50307efd502cfd08758 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 02:45:30 +0200 Subject: [PATCH 34/62] set GtkScale width --- ui/BoxAnimateAppIconHoverOptions.ui | 12 ++++++------ ui/BoxDotOptions.ui | 4 ++-- ui/SettingsFineTune.ui | 15 +++++---------- ui/SettingsPosition.ui | 4 ++-- ui/SettingsStyle.ui | 6 ++---- 5 files changed, 17 insertions(+), 24 deletions(-) diff --git a/ui/BoxAnimateAppIconHoverOptions.ui b/ui/BoxAnimateAppIconHoverOptions.ui index 2babe5ac..26ed9842 100644 --- a/ui/BoxAnimateAppIconHoverOptions.ui +++ b/ui/BoxAnimateAppIconHoverOptions.ui @@ -88,7 +88,7 @@ center - True + 300 animate_appicon_hover_options_duration_adjustment 0 0 @@ -105,7 +105,7 @@ end - True + 300 animate_appicon_hover_options_rotation_adjustment 0 0 @@ -122,7 +122,7 @@ center - True + 300 animate_appicon_hover_options_travel_adjustment 0 0 @@ -139,7 +139,7 @@ center - True + 300 animate_appicon_hover_options_zoom_adjustment 0 0 @@ -156,7 +156,7 @@ end - True + 300 animate_appicon_hover_options_convexity_adjustment 1 1 @@ -173,7 +173,7 @@ center - True + 300 animate_appicon_hover_options_extent_adjustment 0 0 diff --git a/ui/BoxDotOptions.ui b/ui/BoxDotOptions.ui index fb95737d..88c7cff1 100644 --- a/ui/BoxDotOptions.ui +++ b/ui/BoxDotOptions.ui @@ -19,8 +19,8 @@ 600 600 True - + vertical 12 @@ -283,8 +283,8 @@ - + \ No newline at end of file diff --git a/ui/SettingsFineTune.ui b/ui/SettingsFineTune.ui index 34eb1a52..2528f606 100644 --- a/ui/SettingsFineTune.ui +++ b/ui/SettingsFineTune.ui @@ -52,8 +52,7 @@ (0 = theme default) - baseline - True + 300 tray_size_adjustment 0 0 @@ -71,8 +70,7 @@ (0 = theme default) - baseline - True + 300 leftbox_size_adjustment 0 0 @@ -98,8 +96,7 @@ (-1 = theme default) - baseline - True + 300 tray_padding_adjustment 0 0 @@ -117,8 +114,7 @@ (-1 = theme default) - baseline - True + 300 statusicon_padding_adjustment 0 0 @@ -136,8 +132,7 @@ (-1 = theme default) - baseline - True + 300 leftbox_padding_adjustment 0 0 diff --git a/ui/SettingsPosition.ui b/ui/SettingsPosition.ui index d31f9727..14de8147 100644 --- a/ui/SettingsPosition.ui +++ b/ui/SettingsPosition.ui @@ -173,7 +173,7 @@ (default is 48) - True + 300 panel_size_adjustment 0 0 @@ -191,7 +191,7 @@ (default is 100) - True + 300 panel_length_adjustment 0 0 diff --git a/ui/SettingsStyle.ui b/ui/SettingsStyle.ui index cdf525b4..a52f762e 100644 --- a/ui/SettingsStyle.ui +++ b/ui/SettingsStyle.ui @@ -49,8 +49,7 @@ (default is 8) - baseline - True + 300 appicon_margin_adjustment 0 0 @@ -68,8 +67,7 @@ (default is 4) - baseline - True + 300 appicon_padding_adjustment 0 0 From 62377ce8e410de977b209e61715da755f7158f6f Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 14:24:40 +0200 Subject: [PATCH 35/62] migrate box dynamic opacitry options to adw preferences group --- ui/BoxDynamicOpacityOptions.ui | 209 ++++++++------------------------- 1 file changed, 50 insertions(+), 159 deletions(-) diff --git a/ui/BoxDynamicOpacityOptions.ui b/ui/BoxDynamicOpacityOptions.ui index bc2e935d..50f891b6 100644 --- a/ui/BoxDynamicOpacityOptions.ui +++ b/ui/BoxDynamicOpacityOptions.ui @@ -21,191 +21,82 @@ - True - False vertical - 1 - 1 + 600 + 12 + - - True - False - none + + 12 + 12 + 12 + 12 + - - True - True + + The panel background opacity is affected by - - True - False - 12 - 12 - 12 - 12 - 4 - - - True - False - True - The panel background opacity is affected by - 0 - - 0 - 0 - - - - - - True - False - center - - All windows - Focused windows - Maximized windows - - - 0 - 1 - - - + + center + + All windows + Focused windows + Maximized windows + + - - True - True + + Change opacity when a window gets closer than (px) - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - True - end - 4 - 50 - trans_distance_adjustment - True - 50 - - 0 - 1 - - - - - - True - False - True - Change opacity when a window gets closer than (px) - True - 0 - - 0 - 0 - - - + + center + 4 + 50 + trans_distance_adjustment + True + 50 + + 0 + 1 + + - - True - True + + Change opacity to (%) - - True - False - 12 - 12 - 12 - 12 - - - True - False - 12 - Change opacity to (%) - True - 0 - - - - - True - True - end - 0 - trans_opacity_min_adjustment - - + + 0 + center + trans_opacity_min_adjustment + - - True - True + + Opacity change animation duration (ms) - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - True - end - 4 - 50 - trans_anim_time_adjustment - True - 50 - - 0 - 1 - - - - - - True - False - True - Opacity change animation duration (ms) - True - 0 - - 0 - 0 - - - + + 4 + 50 + center + trans_anim_time_adjustment + True + 50 + From bd11400c0f4c007ef5bf8651eb5adec999ab203d Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 14:57:03 +0200 Subject: [PATCH 36/62] harmonise box options margins and padding --- ui/BoxAdvancedOptions.ui | 10 +++++----- ui/BoxAnimateAppIconHoverOptions.ui | 12 +++++------- ui/BoxDotOptions.ui | 28 +++++----------------------- ui/BoxDynamicOpacityOptions.ui | 10 +++++----- ui/BoxShowDesktopOptions.ui | 12 +++++------- 5 files changed, 25 insertions(+), 47 deletions(-) diff --git a/ui/BoxAdvancedOptions.ui b/ui/BoxAdvancedOptions.ui index d80a52e8..3007d952 100644 --- a/ui/BoxAdvancedOptions.ui +++ b/ui/BoxAdvancedOptions.ui @@ -5,14 +5,14 @@ vertical 600 - 12 + 24 + 32 + 32 + 32 + 32 - 12 - 12 - 12 - 12 diff --git a/ui/BoxAnimateAppIconHoverOptions.ui b/ui/BoxAnimateAppIconHoverOptions.ui index 26ed9842..f59934ce 100644 --- a/ui/BoxAnimateAppIconHoverOptions.ui +++ b/ui/BoxAnimateAppIconHoverOptions.ui @@ -48,13 +48,14 @@ vertical 600 - 12 + 24 + 32 + 32 + 32 + 32 - 12 - 12 - 12 @@ -78,9 +79,6 @@ - 12 - 12 - 12 diff --git a/ui/BoxDotOptions.ui b/ui/BoxDotOptions.ui index 88c7cff1..6ca19c47 100644 --- a/ui/BoxDotOptions.ui +++ b/ui/BoxDotOptions.ui @@ -23,13 +23,14 @@ vertical - 12 + 24 + 32 + 32 + 32 + 32 - 12 - 12 - 12 @@ -47,9 +48,6 @@ - 12 - 12 - 12 @@ -92,9 +90,6 @@ - 12 - 12 - 12 @@ -125,9 +120,6 @@ - 12 - 12 - 12 @@ -144,9 +136,6 @@ - 12 - 12 - 12 @@ -203,9 +192,6 @@ - 12 - 12 - 12 @@ -224,10 +210,6 @@ - 12 - 12 - 12 - 12 diff --git a/ui/BoxDynamicOpacityOptions.ui b/ui/BoxDynamicOpacityOptions.ui index 50f891b6..e524aeb2 100644 --- a/ui/BoxDynamicOpacityOptions.ui +++ b/ui/BoxDynamicOpacityOptions.ui @@ -23,14 +23,14 @@ vertical 600 - 12 + 24 + 32 + 32 + 32 + 32 - 12 - 12 - 12 - 12 diff --git a/ui/BoxShowDesktopOptions.ui b/ui/BoxShowDesktopOptions.ui index 8319b7ee..e5982182 100644 --- a/ui/BoxShowDesktopOptions.ui +++ b/ui/BoxShowDesktopOptions.ui @@ -24,13 +24,14 @@ vertical 600 - 8 + 24 + 32 + 32 + 32 + 32 - 8 - 8 - 8 @@ -70,9 +71,6 @@ - 8 - 8 - 8 From 182b21cf4f2cef321862a879768ba77ad4934b2c Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 15:14:55 +0200 Subject: [PATCH 37/62] migrate box group apps options to adw preferences group --- ui/BoxGroupAppsOptions.ui | 459 +++++++++----------------------------- 1 file changed, 101 insertions(+), 358 deletions(-) diff --git a/ui/BoxGroupAppsOptions.ui b/ui/BoxGroupAppsOptions.ui index 07cff47f..ffc4d903 100644 --- a/ui/BoxGroupAppsOptions.ui +++ b/ui/BoxGroupAppsOptions.ui @@ -16,393 +16,136 @@ - True - False vertical - 1 - 1 + 600 + 24 + 32 + 32 + 32 + 32 + - - True - False - 0 + + - - True - False - none + + Font size (px) of the application titles (default is 14) - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - True - end - 4 - 0 - group_apps_label_font_size_adjustment - True - - 0 - 1 - - - - - - True - False - True - Font size (px) of the application titles (default is 14) - True - 0 - - 0 - 0 - - - - - + + center + 4 + 0 + group_apps_label_font_size_adjustment + True + + + + + + Font weight of application titles - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Font weight of application titles - 0 - - 0 - 0 - - - - - - True - False - center - - inherit from theme - normal - lighter - bold - bolder - - - 0 - 1 - - - - - + + center + + inherit from theme + normal + lighter + bold + bolder + + + + + + + Font color of the application titles - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Font color of the application titles - True - 0 - - 0 - 0 - - - - - - True - True - True - end - - 0 - 1 - - - - - + + True + center + + + + + + Font color of the minimized application titles - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Font color of the minimized application titles - True - 0 - - 0 - 0 - - - - - - True - True - True - end - - 0 - 1 - - - - - + + True + center + + + + + + + + + + + + Maximum width (px) of the application titles + (default is 160) - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Maximum width (px) of the application titles (default is 160) - 0 - - 0 - 0 - - - - - - True - True - end - 4 - 0 - group_apps_label_max_width_adjustment - True - - 0 - 1 - - - - - + + center + 4 + 0 + group_apps_label_max_width_adjustment + True + + + + + + Use a fixed width for the application titles + The application titles all have the same width, even if their texts are shorter than the maximum width. The maximum width value is used as the fixed width. - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Use a fixed width for the application titles - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - - - - True - False - True - The application titles all have the same width, even if their texts are shorter than the maximum width. The maximum width value is used as the fixed width. - True - 40 - 0 - - - 1 - 0 - 2 - - - - - + + center + + + + + + + + + + + + Display running indicators on unfocused applications - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Display running indicators on unfocused applications - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - - - + + center + + + + + + Use the favorite icons as application launchers - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Use the favorite icons as application launchers - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - - - + + center + From a75fc69f2c2e15f6af93033d9c0f8e43a9893804 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 15:45:47 +0200 Subject: [PATCH 38/62] migrate box intellihide options to adw preferences group --- prefs.js | 7 + ui/BoxIntellihideOptions.ui | 632 +++++++++--------------------------- 2 files changed, 160 insertions(+), 479 deletions(-) diff --git a/prefs.js b/prefs.js index 1a400351..82522e55 100644 --- a/prefs.js +++ b/prefs.js @@ -1203,6 +1203,13 @@ const Preferences = class { 'sensitive', Gio.SettingsBindFlags.DEFAULT); + if (this._window) { + this._settings.bind('intellihide-use-pressure', + this._builder.get_object('intellihide_use_pressure_options2'), + 'sensitive', + Gio.SettingsBindFlags.DEFAULT); + } + this._settings.bind('intellihide-show-in-fullscreen', this._builder.get_object('intellihide_show_in_fullscreen_switch'), 'active', diff --git a/ui/BoxIntellihideOptions.ui b/ui/BoxIntellihideOptions.ui index 92125bdb..a60dab34 100644 --- a/ui/BoxIntellihideOptions.ui +++ b/ui/BoxIntellihideOptions.ui @@ -37,516 +37,190 @@ - True - False vertical - 1 - 1 + 600 + 24 + 32 + 32 + 32 + 32 + + + + + + + Only hide the panel when it is obstructed by windows + + + center + + + + + + + + The panel hides from + + + center + + All windows + Focused windows + Maximized windows + + + + + + + + + - - True - False - 0 + + - - True - False - none + + Require pressure at the edge of the screen to reveal the panel - - True - True - - - True - False - 12 - 12 - 12 - 12 - 12 - 32 - True - - - True - False - True - Only hide the panel when it is obstructed by windows - True - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - - - - True - False - 12 - 4 - - - True - False - True - The panel hides from - 0 - - 0 - 0 - - - - - - True - False - center - - All windows - Focused windows - Maximized windows - - - 0 - 1 - - - - - 1 - 0 - 2 - - - - - + + center + + + + + + Required pressure threshold (px) - - True - True - - - True - False - 12 - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Require pressure at the edge of the screen to reveal the panel - True - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - - - - True - False - 12 - 4 - - - True - False - True - Required pressure threshold (px) - True - 0 - - 0 - 0 - - - - - - True - True - end - 4 - 0 - intellihide_pressure_threshold_adjustment - True - - 0 - 1 - - - - - - True - False - True - Required pressure timeout (ms) - True - 0 - - 1 - 0 - - - - - - True - True - end - 4 - 0 - intellihide_pressure_time_adjustment - True - - 1 - 1 - - - - - 1 - 0 - 2 - - - - - + + center + 4 + 0 + intellihide_pressure_threshold_adjustment + True + + + + + + Required pressure timeout (ms) + + + center + 4 + 0 + intellihide_pressure_time_adjustment + True + + + + + + + + + + + + + + Allow the panel to be revealed while in fullscreen mode - - 100 - True - True - - - True - False - 12 - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Allow the panel to be revealed while in fullscreen mode - True - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - - - + + center + + + + + + Only hide secondary panels + (requires multi-monitors option) - - True - True - - - True - False - 12 - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Only hide secondary panels (requires multi-monitors option) - True - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - - - + + center + + + + + + Keyboard shortcut to reveal and hold the panel + Syntax: <Shift>, <Ctrl>, <Alt>, <Super> - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - center - 12 - e.g. <Super>i - - 0 - 1 - 2 - - - - - - True - False - True - Keyboard shortcut to reveal and hold the panel - 0 - - 0 - 0 - - - - - - True - False - Syntax: <Shift>, <Ctrl>, <Alt>, <Super> - True - 40 - 0 - - - 1 - 0 - - - - - + + center + 12 + e.g. <Super>i + + + + + + + + + + + + Hide and reveal animation duration (ms) - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Hide and reveal animation duration (ms) - 0 - - 0 - 0 - - - - - - True - True - end - 4 - 0 - intellihide_animation_time_adjustment - True - - 0 - 1 - - - - - + + center + 4 + 0 + intellihide_animation_time_adjustment + True + + + + + + Delay before hiding the panel (ms) - - 100 - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Delay before hiding the panel (ms) - 0 - - 0 - 0 - - - - - - True - True - end - 4 - 10 - intellihide_close_delay_adjustment - True - 10 - - 0 - 1 - - - - - + + center + 4 + 10 + intellihide_close_delay_adjustment + True + 10 + + + + + + Delay before enabling intellihide on start (ms) - - True - True - - - True - False - 12 - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Delay before enabling intellihide on start (ms) - True - 0 - - 0 - 0 - - - - - - True - True - end - 4 - 10 - intellihide_enable_hide_delay_adjustment - True - 10 - - 0 - 1 - - - - - + + center + 4 + 10 + intellihide_enable_hide_delay_adjustment + True + 10 + + \ No newline at end of file From 401c93b6b1addcb05c747460c97e9ad92a766cc1 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 16:01:15 +0200 Subject: [PATCH 39/62] migrate box middle click options to adw preferences group --- ui/BoxMiddleClickOptions.ui | 295 +++++++++--------------------------- 1 file changed, 74 insertions(+), 221 deletions(-) diff --git a/ui/BoxMiddleClickOptions.ui b/ui/BoxMiddleClickOptions.ui index 1f0c8125..8c76a342 100644 --- a/ui/BoxMiddleClickOptions.ui +++ b/ui/BoxMiddleClickOptions.ui @@ -3,243 +3,96 @@ - True - False - 12 - 12 - 12 - 12 vertical - 1 - 1 + 600 + 24 + 32 + 32 + 32 + 32 + - - True - False - 0 + + - - True - False - none + + Shift+Click action + When set to minimize, double clicking minimizes all the windows of the application. - - 100 - 80 - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - When set to minimize, double clicking minimizes all the windows of the application. - True - 40 - 0 - - - 1 - 0 - - - - - - True - False - True - Shift+Click action - 0 - - 0 - 0 - - - - - - True - False - center - - Raise windows - Minimize window - Launch new instance - Cycle through windows - Cycle windows + minimize - Toggle single / Preview multiple - Toggle single / Cycle multiple - Quit - - - 0 - 1 - 2 - - - - - + + center + + Raise windows + Minimize window + Launch new instance + Cycle through windows + Cycle windows + minimize + Toggle single / Preview multiple + Toggle single / Cycle multiple + Quit + + + + + + + + + + + + + Middle-Click action + Behavior for Middle-Click. - - 100 - 80 - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Behavior for Middle-Click. - True - 40 - 0 - - - 1 - 0 - - - - - - True - False - True - Middle-Click action - 0 - - 0 - 0 - - - - - - True - False - center - - Raise windows - Minimize window - Launch new instance - Cycle through windows - Cycle windows + minimize - Toggle single / Preview multiple - Quit - - - 0 - 1 - 2 - - - - - + + center + + Raise windows + Minimize window + Launch new instance + Cycle through windows + Cycle windows + minimize + Toggle single / Preview multiple + Quit + + + + + + + + + + + + + Shift+Middle-Click action + Behavior for Shift+Middle-Click. - - 100 - 80 - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Behavior for Shift+Middle-Click. - True - 40 - 0 - - - 1 - 0 - - - - - - True - False - True - Shift+Middle-Click action - 0 - - 0 - 0 - - - - - - True - False - center - - Raise windows - Minimize window - Launch new instance - Cycle through windows - Cycle windows + minimize - Toggle single / Preview multiple - Quit - - - 0 - 1 - 2 - - - - - + + center + + Raise windows + Minimize window + Launch new instance + Cycle through windows + Cycle windows + minimize + Toggle single / Preview multiple + Quit + + + \ No newline at end of file From c847867dd5557ab17e82fa0600b8eabd1c0db124 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 16:12:13 +0200 Subject: [PATCH 40/62] migrate box overlay shortcut to adw preferences group --- ui/BoxOverlayShortcut.ui | 440 +++++++-------------------------------- 1 file changed, 78 insertions(+), 362 deletions(-) diff --git a/ui/BoxOverlayShortcut.ui b/ui/BoxOverlayShortcut.ui index 85c678e1..98fcb0a5 100644 --- a/ui/BoxOverlayShortcut.ui +++ b/ui/BoxOverlayShortcut.ui @@ -9,389 +9,105 @@ - True - False - 12 - 12 - 12 - 12 vertical - 1 - 1 + 600 + 24 + 32 + 32 + 32 + 32 + - - True - False - 0 + + - - True - False - none + + Hotkeys prefix + Hotkeys will either be Super+Number or Super+Alt+Num - - 100 - 80 - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - center - - Super - Super + Alt - - - 0 - 1 - 2 - - - - - - True - False - True - Hotkeys prefix - 0 - - 0 - 0 - - - - - - True - False - Hotkeys will either be Super+Number or Super+Alt+Num - True - 40 - 0 - - - 1 - 0 - - - - - + + center + + Super + Super + Alt + + + + + + + Number overlay + Temporarily show the application numbers over the icons when using the hotkeys. - - 100 - 80 - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - center - - Never - Show temporarily - Always visible - - - 0 - 1 - 2 - - - - - - True - False - True - Number overlay - 0 - - 0 - 0 - - - - - - True - False - Temporarily show the application numbers over the icons when using the hotkeys. - True - 40 - 0 - - - 1 - 0 - - - - - + + center + + Never + Show temporarily + Always visible + + + + + + + Hide timeout (ms) - - True - True - - - True - False - 12 - 12 - 12 - 12 - True - 6 - 32 - - - True - True - end - shortcut_time_adjustment - - 0 - 1 - - - - - - True - False - True - Hide timeout (ms) - 0 - - 0 - 0 - - - - - + + center + shortcut_time_adjustment + + + + + + Shortcut to show the overlay for 2 seconds + Syntax: <Shift>, <Ctrl>, <Alt>, <Super> - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - center - 12 - e.g. <Super>q - - 0 - 1 - 2 - - - - - - True - False - True - Shortcut to show the overlay for 2 seconds - 0 - - 0 - 0 - - - - - - True - False - Syntax: <Shift>, <Ctrl>, <Alt>, <Super> - True - 40 - 0 - - - 1 - 0 - - - - - + + center + 12 + e.g. <Super>q + + + + + + Show window previews on hotkey + Show previews when the application have multiple instances - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Show window previews on hotkey - True - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - 2 - - - - - - True - False - True - Show previews when the application have multiple instances - True - 40 - 0 - - - 1 - 0 - - - - - - - + + center + + + + + + + + Hotkeys are activated with + Select which keyboard number keys are used to activate the hotkeys - - True - True - - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - end - center - - Number row - Numeric keypad - Both - - - 0 - 1 - 2 - - - - - - True - False - True - Hotkeys are activated with - 0 - - 0 - 0 - - - - - - True - False - Select which keyboard number keys are used to activate the hotkeys - True - 40 - 0 - - - 1 - 0 - - - - - + + center + + Number row + Numeric keypad + Both + + From f32464a3d1fa2d4d3b6de09518ab9bd8e6dada6e Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 16:14:42 +0200 Subject: [PATCH 41/62] migrate box scroll icon options to adw preferences group --- ui/BoxScrollIconOptions.ui | 88 +++++++++----------------------------- 1 file changed, 20 insertions(+), 68 deletions(-) diff --git a/ui/BoxScrollIconOptions.ui b/ui/BoxScrollIconOptions.ui index 27af04e4..bb457ff4 100644 --- a/ui/BoxScrollIconOptions.ui +++ b/ui/BoxScrollIconOptions.ui @@ -9,82 +9,34 @@ - True - False vertical - 1 - 1 + 600 + 24 + 32 + 32 + 32 + 32 + - - True - False - none + + - - True - True + + Delay between mouse scroll events (ms) + Use this value to limit the number of captured mouse scroll events. - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - True - end - center - 4 - 50 - scroll_icon_options_delay_adjustment - True - 50 - - 0 - 1 - 2 - - - - - - True - False - True - Delay between mouse scroll events (ms) - True - 0 - - 0 - 0 - - - - - - True - False - True - Use this value to limit the number of captured mouse scroll events. - True - 0 - - - 1 - 0 - - - + + center + 4 + 50 + scroll_icon_options_delay_adjustment + True + 50 + From b95ec25dd8414efbcef53a5e0f21ffecc229a2dc Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 16:17:47 +0200 Subject: [PATCH 42/62] migrate box scroll panel options to adw preferences group --- ui/BoxScrollPanelOptions.ui | 149 +++++++----------------------------- 1 file changed, 26 insertions(+), 123 deletions(-) diff --git a/ui/BoxScrollPanelOptions.ui b/ui/BoxScrollPanelOptions.ui index 95c7fd5d..2354b76d 100644 --- a/ui/BoxScrollPanelOptions.ui +++ b/ui/BoxScrollPanelOptions.ui @@ -9,143 +9,46 @@ - True - False vertical - 1 - 1 + 600 + 24 + 32 + 32 + 32 + 32 + - - True - False - none + + - - True - True + + Delay between mouse scroll events (ms) + Use this value to limit the number of captured mouse scroll events. - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - True - end - center - 4 - 50 - scroll_panel_options_delay_adjustment - True - 50 - - 0 - 1 - 2 - - - - - - True - False - True - Delay between mouse scroll events (ms) - True - 0 - - 0 - 0 - - - - - - True - False - True - Use this value to limit the number of captured mouse scroll events. - True - 0 - - - 1 - 0 - - - + + center + 4 + 50 + scroll_panel_options_delay_adjustment + True + 50 + - - True - True + + Show popup when changing workspace + This affects workspace popup when scrolling on the panel only. - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Show popup when changing workspace - True - 0 - - 0 - 0 - - - - - - True - False - True - This affects workspace popup when scrolling on the panel only. - True - 0 - - - 1 - 0 - - - - - - True - True - end - center - - 0 - 1 - 2 - - - + + center + From 7616a1e9041b4c073d30a5dd94a903e4139aa436 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 16:21:39 +0200 Subject: [PATCH 43/62] migrate box secondary menu options to adw preferences group --- ui/BoxSecondaryMenuOptions.ui | 120 +++++++--------------------------- 1 file changed, 22 insertions(+), 98 deletions(-) diff --git a/ui/BoxSecondaryMenuOptions.ui b/ui/BoxSecondaryMenuOptions.ui index c58ba17f..483ddc82 100644 --- a/ui/BoxSecondaryMenuOptions.ui +++ b/ui/BoxSecondaryMenuOptions.ui @@ -3,115 +3,39 @@ - True - False vertical - 1 - 1 + 600 + 24 + 32 + 32 + 32 + 32 + - - True - False - 0 + + - - True - False - none + + Integrate <i>AppMenu</i> items - - 100 - 80 - True - True - - - True - False - center - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Integrate <i>AppMenu</i> items - True - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - - - + + center + + + + + + <i>Show Details</i> menu item - - 100 - 80 - True - True - - - True - False - center - 12 - 12 - 12 - 12 - 32 - - - True - False - True - <i>Show Details</i> menu item - True - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - - - + + center + From 28b2d497325c0f2b0c64b001156ba72fe27c56a4 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 16:30:50 +0200 Subject: [PATCH 44/62] migrate box show applications options to adw preferences group --- ui/BoxShowApplicationsOptions.ui | 153 +++++++------------------------ 1 file changed, 31 insertions(+), 122 deletions(-) diff --git a/ui/BoxShowApplicationsOptions.ui b/ui/BoxShowApplicationsOptions.ui index dd2e605d..fa530d1b 100644 --- a/ui/BoxShowApplicationsOptions.ui +++ b/ui/BoxShowApplicationsOptions.ui @@ -9,168 +9,77 @@ - True - False vertical - 1 - 1 + 600 + 24 + 32 + 32 + 32 + 32 + - - True - True + + - - True - False - 12 - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Current Show Applications icon - True - 0 - - 0 - 0 - - - + + Show Applications icon 32 32 - True False - end gtk-missing-image 32 - - 0 - 1 - + + + + + + 8 + 8 + 8 + 8 140 True - - 1 - 1 - - - - - - True - False - True - Custom Show Applications image icon - True - 0 - - 1 - 0 - + + - - True - True + + - - True - False - 12 - 12 - 12 - 12 - True - 6 - 32 + + Show Applications icon side padding (px) - True - True - end + center 0 show_applications_side_padding_adjustment - - 0 - 1 - - - - - - True - False - True - Show Applications icon side padding (px) - 0 - - 0 - 0 - - - - - - True - True + - - True - False - 12 - 12 - 12 - 12 - 32 + + Override escape key and return to desktop - True - True - end center - - 0 - 1 - - - - - - True - False - True - Override escape key and return to desktop - True - 0 - - 0 - 0 - + From ff3235222d9258b172554399ef7804be777b63ab Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 17:22:29 +0200 Subject: [PATCH 45/62] migrate box window preview options to adw preferences group --- ui/BoxWindowPreviewOptions.ui | 1281 +++++++++------------------------ 1 file changed, 360 insertions(+), 921 deletions(-) diff --git a/ui/BoxWindowPreviewOptions.ui b/ui/BoxWindowPreviewOptions.ui index bb9358b2..2b9da63f 100644 --- a/ui/BoxWindowPreviewOptions.ui +++ b/ui/BoxWindowPreviewOptions.ui @@ -67,979 +67,418 @@ - True - True - 460 - 480 + 800 + 600 + True - - True - False - True - True - natural - natural + + + vertical + 600 + 24 + 32 + 32 + 32 + 32 + - - True - False - none + + - - True - True + + Time (ms) before showing + (400 is default) - - True - False - 12 - 12 - 12 - 12 - 12 - 32 - - - True - True - end - 4 - 0 - preview_timeout_adjustment - True - - 0 - 1 - - - - - - True - False - True - Time (ms) before showing (400 is default) - True - 0 - - 0 - 0 - - - - - - True - False - True - Animation time (ms) - 0 - - 2 - 0 - - - - - - True - True - end - 4 - 0 - preview_animation_time_adjustment - True - - 2 - 1 - - - - - - True - False - vertical - - - True - False - True - Time (ms) before hiding (100 is default) - 0 - - - - - True - True - False - 12 - 4 - - - 4 - True - False - start - 4 - Immediate on application icon click - True - - - - - - 1 - 0 - - - - - - True - True - end - center - 4 - 25 - leave_timeout_adjustment - True - 25 - - 1 - 1 - - - + + center + 4 + 0 + preview_timeout_adjustment + True + - - True - True + + Time (ms) before hiding + (100 is default) - - True - False - 12 - 12 - 12 - 12 - 32 + + False - - True + + 4 False - True - Middle click on the preview to close the window + Immediate on application icon click True - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - + + + center + 4 + 25 + leave_timeout_adjustment + True + 25 + + + - - True - True + + Animation time (ms) - - True - False - 12 - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Window previews preferred size (px) - True - 0 - - 0 - 0 - 2 - - - - - - True - True - end - 4 - 100 - preview_size_adjustment - True - 100 - - - - - True - False - True - Window previews aspect ratio Y (height) - True - 0 - - 2 - 0 - - - - - - True - False - True - Window previews padding (px) - True - 0 - - 3 - 0 - - - - - - True - True - end - 4 - 50 - preview_padding_adjustment - True - 50 - - 3 - 1 - - - - - - True - False - end - 2 - True - - - True - False - end - center - - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - - - - - - Fixed - True - True - True - end - - - - 1 - 1 - - - - - - True - False - True - Window previews aspect ratio X (width) - True - 0 - - 1 - 0 - - - - - - True - False - end - 2 - True - - - True - False - end - center - - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - - - - - - Fixed - True - True - True - end - - - - 2 - 1 - - - + + center + 4 + 0 + preview_animation_time_adjustment + True + + + + + + + - - True - True + + Middle click on the preview to close the window - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Use custom opacity for the previews background - True - 0 - - 0 - 0 - - - - - - True - False - True - If disabled, the previews background have the same opacity as the panel - True - 40 - 0 - - - 1 - 0 - 2 - - - - - - True - False - 8 - - - True - True - end - center - - - - - True - True - end - center - 5 - preview_opacity_adjustment - 5 - - - - 0 - 1 - - - + + center + + + + + + + - - True - True + + Window previews preferred size (px) - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Close button and header position - 0 - - - - - True - False - end - 32 - - - Bottom - True - True - False - center - center - True - - - - - - Top - True - True - False - center - center - preview_title_position_bottom_button - - - - - + + center + 4 + 100 + preview_size_adjustment + True + 100 + - - True - True + + Window previews aspect ratio X (width) - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Display window preview headers - True - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - - - - True - False - 12 - 32 - - - True - False - 8 - - - True - True - end - center - - - - - True - True - end - 4 - 6 - preview_custom_icon_size_adjustment - True - 6 - - - - 0 - 1 - - - - - - True - False - True - Icon size (px) of the window preview - True - 0 - - 1 - 0 - - - - - - True - False - True - If disabled, the previews icon size will be based on headerbar size - True - 40 - 0 - - - 1 - 0 - 2 - - - - - 1 - 0 - 2 - - - - - - True - False - 12 - 32 - - - True - True - end - 4 - 6 - preview_title_font_size_adjustment - True - 6 - - 0 - 1 - - - - - - True - False - True - Font size (px) of the preview titles - True - 0 - - 0 - 0 - - - - - 2 - 0 - 2 - - - - - - True - False - 12 - 32 - - - True - False - True - Font weight of the preview titles - 0 - - 0 - 0 - - - - - - True - False - end - center - - inherit from theme - normal - lighter - bold - bolder - - - 0 - 1 - - - - - 3 - 0 - 2 - - - - - - True - False - 12 - 32 - - - True - False - True - Font color of the preview titles - True - 0 - - 0 - 0 - - - - - - True - True - True - end - - 0 - 1 - - - - - 4 - 0 - 2 - - - + + center + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + + + + + + Fixed + True + center + - - True - True - 6 + + Window previews aspect ratio Y (height) - - True - False - 12 - 12 - 12 - 12 - 32 - - - True - False - True - Enable window peeking - True - 0 - - 0 - 0 - - - - - - True - True - end - center - - 0 - 1 - - - - - - True - False - True - When hovering over a window preview for some time, the window gets distinguished. - True - 40 - 0 - - - 1 - 0 - 2 - - - - - - True - False - 12 - 32 - - - True - False - True - Enter window peeking mode timeout (ms) - 0 - - 0 - 0 - - - - - - True - True - end - 4 - 50 - enter_peek_mode_timeout_adjustment - True - 50 - - 0 - 1 - - - - - - True - False - True - Time of inactivity while hovering over a window preview needed to enter the window peeking mode. - True - 40 - 0 - - - 1 - 0 - 2 - - - - - 2 - 0 - 2 - - - - - - True - False - 12 - 32 - - - True - False - True - Window peeking mode opacity - 0 - - 0 - 0 - - - - - - True - True - end - 4 - 0 - peek_mode_opacity_adjustment - True - - 0 - 1 - - - - - - True - False - True - All windows except for the peeked one have their opacity set to the same value. - True - 40 - 0 - - - 1 - 0 - 2 - - - - - 3 - 0 - 2 - - - + + center + + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + + + + + + Fixed + True + center + + + + + + + + Window previews padding (px) + + + center + 4 + 50 + preview_padding_adjustment + True + 50 + + + + + + + + + + + + + + Use custom opacity for the previews background + If disabled, the previews background have the same opacity as the panel. + + + center + + + + + center + 5 + preview_opacity_adjustment + 5 + + + + + + + + + + + + + + Close button and header position + + + Bottom + False + center + True + + + + + + Top + False + center + preview_title_position_bottom_button + + + + + + + + + + + + + + + Display window preview headers + + > + center + + + + Icon size (px) of the window preview + If disabled, the previews icon size will be based on headerbar size + + + center + + + + + center + 4 + 6 + preview_custom_icon_size_adjustment + True + 6 + + + + + + + + Font size (px) of the preview titles + + + center + 4 + 6 + preview_title_font_size_adjustment + True + 6 + + + + + + + + Font weight of the preview titles + + + center + + inherit from theme + normal + lighter + bold + bolder + + + + + + + + + Font color of the preview titles + + + True + center + + + + + + + + + + + + + + Enable window peeking + When hovering over a window preview for some time, the window gets distinguished. + + + center + + + + + + + + Enter window peeking mode timeout (ms) + Time of inactivity while hovering over a window preview needed to enter the window peeking mode. + + + center + 4 + 50 + enter_peek_mode_timeout_adjustment + True + 50 + + + + + + + + Window peeking mode opacity + All windows except for the peeked one have their opacity set to the same value. + + + center + 4 + 0 + peek_mode_opacity_adjustment + True + + + + + + + From 0ef521d39d543b5b22553ddf4e4209a9a8c568e7 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 17:30:05 +0200 Subject: [PATCH 46/62] use deault width or preferences window --- prefs.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prefs.js b/prefs.js index 82522e55..74f743f1 100644 --- a/prefs.js +++ b/prefs.js @@ -2348,7 +2348,8 @@ function init() { } function fillPreferencesWindow(window) { - window.set_default_size(680, 740); + // use default width or window + window.set_default_size(0, 740); let preferences = new Preferences(window); } From 5c200d7577cea405a6ba73731c2f75a8d12f2982 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 18:03:32 +0200 Subject: [PATCH 47/62] fix sensitive change of grid_dot_color_unfocused --- prefs.js | 1 + ui/BoxDotOptions.ui | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/prefs.js b/prefs.js index 74f743f1..c2dc4539 100644 --- a/prefs.js +++ b/prefs.js @@ -836,6 +836,7 @@ const Preferences = class { }); this._builder.get_object('dot_color_override_switch').connect('state-set', (widget) => { if (widget.get_active()) this._settings.set_boolean('dot-color-dominant', false); + else if (this._window) this._settings.set_boolean('dot-color-unfocused-different', false); }); this._settings.bind('dot-color-unfocused-different', diff --git a/ui/BoxDotOptions.ui b/ui/BoxDotOptions.ui index 6ca19c47..18c81ecb 100644 --- a/ui/BoxDotOptions.ui +++ b/ui/BoxDotOptions.ui @@ -207,7 +207,6 @@ - From 2daa798050c8b8d6519bfc63b1a0324692acbf71 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 20:27:33 +0200 Subject: [PATCH 48/62] fix taskbar_display_listbox background mismatch --- prefs.js | 6 ++++++ ui/SettingsPosition.ui | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/prefs.js b/prefs.js index c2dc4539..6bcaa86a 100644 --- a/prefs.js +++ b/prefs.js @@ -210,6 +210,12 @@ const Preferences = class { let pageAbout = this._builder.get_object('about'); window.add(pageAbout); + let listbox = this._builder.get_object('taskbar_display_listbox'); + let provider = new Gtk.CssProvider(); + provider.load_from_data('list { background-color: transparent; }'); + let context = listbox.get_style_context(); + context.add_provider(provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); + // set the window as notebook, it is being used as parent for dialogs this.notebook = window; diff --git a/ui/SettingsPosition.ui b/ui/SettingsPosition.ui index 14de8147..304bf1f3 100644 --- a/ui/SettingsPosition.ui +++ b/ui/SettingsPosition.ui @@ -231,9 +231,10 @@ Taskbar Display + 6 + 6 True False - 6 none From a3af647b4d7b06926d2518f74cd63bab552601ab Mon Sep 17 00:00:00 2001 From: Philipp <57151725+philippun1@users.noreply.github.com> Date: Tue, 12 Apr 2022 16:39:57 +0200 Subject: [PATCH 49/62] Update ui/SettingsPosition.ui Co-authored-by: Andrew Zaech --- ui/SettingsPosition.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/SettingsPosition.ui b/ui/SettingsPosition.ui index 304bf1f3..5a8c379f 100644 --- a/ui/SettingsPosition.ui +++ b/ui/SettingsPosition.ui @@ -17,7 +17,7 @@ Position - find-location + find-location-symbolic From e46a5feca55c37daa2e00622d0a7b37120421d0f Mon Sep 17 00:00:00 2001 From: Philipp <57151725+philippun1@users.noreply.github.com> Date: Tue, 12 Apr 2022 16:40:11 +0200 Subject: [PATCH 50/62] Update ui/SettingsPosition.ui Co-authored-by: Andrew Zaech --- ui/SettingsPosition.ui | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/SettingsPosition.ui b/ui/SettingsPosition.ui index 5a8c379f..6c1a0973 100644 --- a/ui/SettingsPosition.ui +++ b/ui/SettingsPosition.ui @@ -28,7 +28,8 @@ Display the main panel on - + + False center From 7b7473e40767dada7e6c3acb1a7515f2b8c3ec77 Mon Sep 17 00:00:00 2001 From: Philipp <57151725+philippun1@users.noreply.github.com> Date: Tue, 12 Apr 2022 16:40:18 +0200 Subject: [PATCH 51/62] Update ui/SettingsPosition.ui Co-authored-by: Andrew Zaech --- ui/SettingsPosition.ui | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/SettingsPosition.ui b/ui/SettingsPosition.ui index 6c1a0973..7ea97756 100644 --- a/ui/SettingsPosition.ui +++ b/ui/SettingsPosition.ui @@ -40,8 +40,7 @@ Display panels on all monitors - - False + center From e96196e262c7892fca9ba72ae1a486dd39041073 Mon Sep 17 00:00:00 2001 From: Philipp <57151725+philippun1@users.noreply.github.com> Date: Tue, 12 Apr 2022 16:40:26 +0200 Subject: [PATCH 52/62] Update ui/SettingsAbout.ui Co-authored-by: Andrew Zaech --- ui/SettingsAbout.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/SettingsAbout.ui b/ui/SettingsAbout.ui index caeb2755..e5bcfbdc 100644 --- a/ui/SettingsAbout.ui +++ b/ui/SettingsAbout.ui @@ -4,7 +4,7 @@ About - help-about + help-about-symbolic From c2befa5e926228ed564cfe04cf33cff4cf7253a6 Mon Sep 17 00:00:00 2001 From: Philipp <57151725+philippun1@users.noreply.github.com> Date: Tue, 12 Apr 2022 16:40:33 +0200 Subject: [PATCH 53/62] Update ui/SettingsAction.ui Co-authored-by: Andrew Zaech --- ui/SettingsAction.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/SettingsAction.ui b/ui/SettingsAction.ui index c552d1ea..6d40ab86 100644 --- a/ui/SettingsAction.ui +++ b/ui/SettingsAction.ui @@ -4,7 +4,7 @@ Action - view-pin + view-pin-symbolic From 0c9f09f81ab674c52d5acd68d9e05b5a599c6700 Mon Sep 17 00:00:00 2001 From: Philipp <57151725+philippun1@users.noreply.github.com> Date: Tue, 12 Apr 2022 16:40:49 +0200 Subject: [PATCH 54/62] Update ui/SettingsBehavior.ui Co-authored-by: Andrew Zaech --- ui/SettingsBehavior.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/SettingsBehavior.ui b/ui/SettingsBehavior.ui index 9ea25601..d363ffae 100644 --- a/ui/SettingsBehavior.ui +++ b/ui/SettingsBehavior.ui @@ -3,7 +3,7 @@ Behavior - visible + preferences-system-symbolic From 72784bfebf7105e489a57d66aa6c1a07db001a45 Mon Sep 17 00:00:00 2001 From: Philipp <57151725+philippun1@users.noreply.github.com> Date: Tue, 12 Apr 2022 16:40:58 +0200 Subject: [PATCH 55/62] Update ui/SettingsFineTune.ui Co-authored-by: Andrew Zaech --- ui/SettingsFineTune.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/SettingsFineTune.ui b/ui/SettingsFineTune.ui index 2528f606..7e529f2e 100644 --- a/ui/SettingsFineTune.ui +++ b/ui/SettingsFineTune.ui @@ -39,7 +39,7 @@ Fine-Tune - color-select + preferences-other-symbolic From c048935ead41ad0f4cb03d52e9d9a511638e4291 Mon Sep 17 00:00:00 2001 From: Philipp <57151725+philippun1@users.noreply.github.com> Date: Tue, 12 Apr 2022 16:41:06 +0200 Subject: [PATCH 56/62] Update ui/SettingsStyle.ui Co-authored-by: Andrew Zaech --- ui/SettingsStyle.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/SettingsStyle.ui b/ui/SettingsStyle.ui index a52f762e..299600b2 100644 --- a/ui/SettingsStyle.ui +++ b/ui/SettingsStyle.ui @@ -36,7 +36,7 @@ Style - image-adjust-color + applications-graphics-symbolic From a55845b331dcec023ff6fc86be30ae7a01012c68 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Wed, 13 Apr 2022 20:08:27 +0200 Subject: [PATCH 57/62] use default gtk focus --- ui/BoxAnimateAppIconHoverOptions.ui | 1 - ui/BoxShowApplicationsOptions.ui | 1 - ui/BoxShowDesktopOptions.ui | 1 - ui/BoxWindowPreviewOptions.ui | 1 - ui/SettingsAction.ui | 8 -------- ui/SettingsFineTune.ui | 2 -- ui/SettingsPosition.ui | 5 ----- ui/SettingsStyle.ui | 2 -- 8 files changed, 21 deletions(-) diff --git a/ui/BoxAnimateAppIconHoverOptions.ui b/ui/BoxAnimateAppIconHoverOptions.ui index f59934ce..f49e2d72 100644 --- a/ui/BoxAnimateAppIconHoverOptions.ui +++ b/ui/BoxAnimateAppIconHoverOptions.ui @@ -62,7 +62,6 @@ Animation type - False center Simple diff --git a/ui/BoxShowApplicationsOptions.ui b/ui/BoxShowApplicationsOptions.ui index fa530d1b..ee183a5b 100644 --- a/ui/BoxShowApplicationsOptions.ui +++ b/ui/BoxShowApplicationsOptions.ui @@ -27,7 +27,6 @@ 32 32 - False gtk-missing-image 32 diff --git a/ui/BoxShowDesktopOptions.ui b/ui/BoxShowDesktopOptions.ui index e5982182..be5d21c1 100644 --- a/ui/BoxShowDesktopOptions.ui +++ b/ui/BoxShowDesktopOptions.ui @@ -78,7 +78,6 @@ True - True end center diff --git a/ui/BoxWindowPreviewOptions.ui b/ui/BoxWindowPreviewOptions.ui index 2b9da63f..87cecff4 100644 --- a/ui/BoxWindowPreviewOptions.ui +++ b/ui/BoxWindowPreviewOptions.ui @@ -110,7 +110,6 @@ 4 - False Immediate on application icon click True diff --git a/ui/SettingsAction.ui b/ui/SettingsAction.ui index 6d40ab86..790e1185 100644 --- a/ui/SettingsAction.ui +++ b/ui/SettingsAction.ui @@ -21,7 +21,6 @@ center - False emblem-system-symbolic @@ -32,7 +31,6 @@ - False center Cycle windows + minimize @@ -62,14 +60,12 @@ True - True True end center True - False emblem-system-symbolic @@ -81,7 +77,6 @@ True - False center True @@ -106,7 +101,6 @@ True - False emblem-system-symbolic @@ -117,7 +111,6 @@ - False center True @@ -148,7 +141,6 @@ center - False emblem-system-symbolic diff --git a/ui/SettingsFineTune.ui b/ui/SettingsFineTune.ui index 7e529f2e..5306ec54 100644 --- a/ui/SettingsFineTune.ui +++ b/ui/SettingsFineTune.ui @@ -245,7 +245,6 @@ center - False emblem-system-symbolic @@ -268,7 +267,6 @@ Advanced Options False - True True end diff --git a/ui/SettingsPosition.ui b/ui/SettingsPosition.ui index 7ea97756..b7a1b31c 100644 --- a/ui/SettingsPosition.ui +++ b/ui/SettingsPosition.ui @@ -29,7 +29,6 @@ Display the main panel on - False center @@ -62,7 +61,6 @@ center - False emblem-system-symbolic @@ -107,7 +105,6 @@ - False end center True @@ -207,7 +204,6 @@ Anchor - False center Start @@ -234,7 +230,6 @@ 6 6 True - False none diff --git a/ui/SettingsStyle.ui b/ui/SettingsStyle.ui index 299600b2..a84a2bbb 100644 --- a/ui/SettingsStyle.ui +++ b/ui/SettingsStyle.ui @@ -92,7 +92,6 @@ center - False emblem-system-symbolic @@ -271,7 +270,6 @@ center - False emblem-system-symbolic From 0f2442c200ea83858b54a26ac076f9de82a2022a Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Mon, 18 Apr 2022 16:51:35 +0200 Subject: [PATCH 58/62] removed prefs.js backwards compatibility to gnome 41 --- prefs.js | 166 +++++++++++++++++++++++-------------------------------- 1 file changed, 70 insertions(+), 96 deletions(-) diff --git a/prefs.js b/prefs.js index 6bcaa86a..5525fc07 100644 --- a/prefs.js +++ b/prefs.js @@ -158,71 +158,64 @@ function mergeObjects(main, bck) { const Preferences = class { - constructor() { + constructor(window) { this._settings = ExtensionUtils.getSettings('org.gnome.shell.extensions.dash-to-panel'); this._rtl = (Gtk.Widget.get_default_direction() == Gtk.TextDirection.RTL); this._builder = new Gtk.Builder(); this._builder.set_scope(new BuilderScope(this)); this._builder.set_translation_domain(Me.metadata['gettext-domain']); - if (window) { - this._window = window; - window.set_search_enabled(true); - - // dialogs - this._builder.add_from_file(Me.path + '/ui/BoxAnimateAppIconHoverOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/BoxDotOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/BoxShowDesktopOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/BoxDynamicOpacityOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/BoxIntellihideOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/BoxShowApplicationsOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/BoxWindowPreviewOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/BoxGroupAppsOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/BoxMiddleClickOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/BoxOverlayShortcut.ui'); - this._builder.add_from_file(Me.path + '/ui/BoxSecondaryMenuOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/BoxScrollPanelOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/BoxScrollIconOptions.ui'); - this._builder.add_from_file(Me.path + '/ui/BoxAdvancedOptions.ui'); - - // pages - this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); - let pagePosition = this._builder.get_object('position'); - window.add(pagePosition); - - this._builder.add_from_file(Me.path + '/ui/SettingsStyle.ui'); - let pageStyle = this._builder.get_object('style'); - window.add(pageStyle); - - this._builder.add_from_file(Me.path + '/ui/SettingsBehavior.ui'); - let pageBehavior = this._builder.get_object('behavior'); - window.add(pageBehavior); - - this._builder.add_from_file(Me.path + '/ui/SettingsAction.ui'); - let pageAction = this._builder.get_object('action'); - window.add(pageAction); - - this._builder.add_from_file(Me.path + '/ui/SettingsFineTune.ui'); - let pageFineTune = this._builder.get_object('finetune'); - window.add(pageFineTune); - - this._builder.add_from_file(Me.path + '/ui/SettingsAbout.ui'); - let pageAbout = this._builder.get_object('about'); - window.add(pageAbout); - - let listbox = this._builder.get_object('taskbar_display_listbox'); - let provider = new Gtk.CssProvider(); - provider.load_from_data('list { background-color: transparent; }'); - let context = listbox.get_style_context(); - context.add_provider(provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); - - // set the window as notebook, it is being used as parent for dialogs - this.notebook = window; - - } else { - this._builder.add_from_file(Me.path + '/Settings.ui'); - this.notebook = this._builder.get_object('settings_notebook'); - } + window.set_search_enabled(true); + + // dialogs + this._builder.add_from_file(Me.path + '/ui/BoxAnimateAppIconHoverOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxDotOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxShowDesktopOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxDynamicOpacityOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxIntellihideOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxShowApplicationsOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxWindowPreviewOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxGroupAppsOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxMiddleClickOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxOverlayShortcut.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxSecondaryMenuOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxScrollPanelOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxScrollIconOptions.ui'); + this._builder.add_from_file(Me.path + '/ui/BoxAdvancedOptions.ui'); + + // pages + this._builder.add_from_file(Me.path + '/ui/SettingsPosition.ui'); + let pagePosition = this._builder.get_object('position'); + window.add(pagePosition); + + this._builder.add_from_file(Me.path + '/ui/SettingsStyle.ui'); + let pageStyle = this._builder.get_object('style'); + window.add(pageStyle); + + this._builder.add_from_file(Me.path + '/ui/SettingsBehavior.ui'); + let pageBehavior = this._builder.get_object('behavior'); + window.add(pageBehavior); + + this._builder.add_from_file(Me.path + '/ui/SettingsAction.ui'); + let pageAction = this._builder.get_object('action'); + window.add(pageAction); + + this._builder.add_from_file(Me.path + '/ui/SettingsFineTune.ui'); + let pageFineTune = this._builder.get_object('finetune'); + window.add(pageFineTune); + + this._builder.add_from_file(Me.path + '/ui/SettingsAbout.ui'); + let pageAbout = this._builder.get_object('about'); + window.add(pageAbout); + + let listbox = this._builder.get_object('taskbar_display_listbox'); + let provider = new Gtk.CssProvider(); + provider.load_from_data('list { background-color: transparent; }'); + let context = listbox.get_style_context(); + context.add_provider(provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); + + // set the window as notebook, it is being used as parent for dialogs + this.notebook = window; // Timeout to delay the update of the settings this._panel_size_timeout = 0; @@ -251,10 +244,7 @@ const Preferences = class { let isVertical = position == Pos.LEFT || position == Pos.RIGHT; let showDesktopWidthLabel = this._builder.get_object('show_showdesktop_width_label'); - if(this._window) - showDesktopWidthLabel.set_title(isVertical ? _('Show Desktop button height (px)') : _('Show Desktop button width (px)')); - else - showDesktopWidthLabel.set_text(isVertical ? _('Show Desktop button height (px)') : _('Show Desktop button width (px)')); + showDesktopWidthLabel.set_title(isVertical ? _('Show Desktop button height (px)') : _('Show Desktop button width (px)')); this._displayPanelPositionsForMonitor(this._currentMonitorIndex); } @@ -842,7 +832,7 @@ const Preferences = class { }); this._builder.get_object('dot_color_override_switch').connect('state-set', (widget) => { if (widget.get_active()) this._settings.set_boolean('dot-color-dominant', false); - else if (this._window) this._settings.set_boolean('dot-color-unfocused-different', false); + else this._settings.set_boolean('dot-color-unfocused-different', false); }); this._settings.bind('dot-color-unfocused-different', @@ -1039,12 +1029,10 @@ const Preferences = class { 'sensitive', Gio.SettingsBindFlags.DEFAULT); - if (this._window) { - this._settings.bind('trans-use-custom-opacity', - this._builder.get_object('trans_opacity_box2'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - } + this._settings.bind('trans-use-custom-opacity', + this._builder.get_object('trans_opacity_box2'), + 'sensitive', + Gio.SettingsBindFlags.DEFAULT); this._builder.get_object('trans_opacity_override_switch').connect('notify::active', (widget) => { if (!widget.get_active()) @@ -1081,12 +1069,10 @@ const Preferences = class { 'sensitive', Gio.SettingsBindFlags.DEFAULT); - if (this._window) { - this._settings.bind('trans-use-custom-gradient', - this._builder.get_object('trans_gradient_box2'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - } + this._settings.bind('trans-use-custom-gradient', + this._builder.get_object('trans_gradient_box2'), + 'sensitive', + Gio.SettingsBindFlags.DEFAULT); rgba.parse(this._settings.get_string('trans-gradient-top-color')); this._builder.get_object('trans_gradient_color1_colorbutton').set_rgba(rgba); @@ -1210,12 +1196,10 @@ const Preferences = class { 'sensitive', Gio.SettingsBindFlags.DEFAULT); - if (this._window) { - this._settings.bind('intellihide-use-pressure', - this._builder.get_object('intellihide_use_pressure_options2'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - } + this._settings.bind('intellihide-use-pressure', + this._builder.get_object('intellihide_use_pressure_options2'), + 'sensitive', + Gio.SettingsBindFlags.DEFAULT); this._settings.bind('intellihide-show-in-fullscreen', this._builder.get_object('intellihide_show_in_fullscreen_switch'), @@ -1325,12 +1309,10 @@ const Preferences = class { 'sensitive', Gio.SettingsBindFlags.DEFAULT); - if(this._window) { - this._settings.bind('show-showdesktop-hover', - this._builder.get_object('grid_show_showdesktop_hide_options2'), - 'sensitive', - Gio.SettingsBindFlags.DEFAULT); - } + this._settings.bind('show-showdesktop-hover', + this._builder.get_object('grid_show_showdesktop_hide_options2'), + 'sensitive', + Gio.SettingsBindFlags.DEFAULT); this._settings.bind('show-appmenu', this._builder.get_object('show_appmenu_switch'), @@ -2360,11 +2342,3 @@ function fillPreferencesWindow(window) { let preferences = new Preferences(window); } - -function buildPrefsWidget() { - Gtk.Window.list_toplevels()[0].set_default_size(680, 740); - - let preferences = new Preferences(); - - return preferences.notebook; -} From 6215a2f4000b6989d4053d963595588b51d7afdc Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Mon, 18 Apr 2022 23:14:24 +0200 Subject: [PATCH 59/62] Add 'Toggle single / Cycle multiple' option to all click methods --- ui/BoxMiddleClickOptions.ui | 2 ++ ui/SettingsAction.ui | 1 + 2 files changed, 3 insertions(+) diff --git a/ui/BoxMiddleClickOptions.ui b/ui/BoxMiddleClickOptions.ui index 8c76a342..023845e6 100644 --- a/ui/BoxMiddleClickOptions.ui +++ b/ui/BoxMiddleClickOptions.ui @@ -56,6 +56,7 @@ Cycle through windows Cycle windows + minimize Toggle single / Preview multiple + Toggle single / Cycle multiple Quit @@ -83,6 +84,7 @@ Cycle through windows Cycle windows + minimize Toggle single / Preview multiple + Toggle single / Cycle multiple Quit diff --git a/ui/SettingsAction.ui b/ui/SettingsAction.ui index 790e1185..b22053f1 100644 --- a/ui/SettingsAction.ui +++ b/ui/SettingsAction.ui @@ -36,6 +36,7 @@ Cycle windows + minimize Cycle through windows Toggle single / Preview multiple + Toggle single / Cycle multiple Toggle windows Raise windows Launch new instance From dbce12a35956187d7a241025428c70eacc23b414 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Mon, 18 Apr 2022 23:18:21 +0200 Subject: [PATCH 60/62] Toggle for notification counter badge --- ui/SettingsBehavior.ui | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ui/SettingsBehavior.ui b/ui/SettingsBehavior.ui index d363ffae..18db9436 100644 --- a/ui/SettingsBehavior.ui +++ b/ui/SettingsBehavior.ui @@ -80,6 +80,19 @@ + + + Show notification counter badge + + + True + end + center + + + + + From d4a0ec1bfae38c87db6dd25466abc79b1871d887 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Mon, 18 Apr 2022 23:25:55 +0200 Subject: [PATCH 61/62] remove version check in _createPreferencesDialog --- prefs.js | 53 +++++++++++++++++++++++++---------------------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/prefs.js b/prefs.js index 5525fc07..e7c02e06 100644 --- a/prefs.js +++ b/prefs.js @@ -486,34 +486,31 @@ const Preferences = class { _createPreferencesDialog(title, content, reset_function = null) { let dialog; - if (true) { // Config.PACKAGE_VERSION < '42') { - dialog = new Gtk.Dialog({ title: title, - transient_for: this.notebook.get_root(), - use_header_bar: true, - modal: true }); - - // GTK+ leaves positive values for application-defined response ids. - // Use +1 for the reset action - if (reset_function != null) - dialog.add_button(_('Reset to defaults'), 1); - - dialog.get_content_area().append(content); - - dialog.connect('response', (dialog, id) => { - if (id == 1) { - // restore default settings - if (reset_function) - reset_function(); - } else { - // remove the settings content so it doesn't get destroyed; - dialog.get_content_area().remove(content); - dialog.destroy(); - } - return; - }); - } else { - dialog = new Adw.PreferencesWindow({ title: title }); - } + dialog = new Gtk.Dialog({ title: title, + transient_for: this.notebook.get_root(), + use_header_bar: true, + modal: true }); + + // GTK+ leaves positive values for application-defined response ids. + // Use +1 for the reset action + if (reset_function != null) + dialog.add_button(_('Reset to defaults'), 1); + + dialog.get_content_area().append(content); + + dialog.connect('response', (dialog, id) => { + if (id == 1) { + // restore default settings + if (reset_function) + reset_function(); + } else { + // remove the settings content so it doesn't get destroyed; + dialog.get_content_area().remove(content); + dialog.destroy(); + } + return; + }); + return dialog; } From 212ca617521da1d217607efba2290a5cbf9ae05f Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Thu, 28 Apr 2022 23:28:19 +0200 Subject: [PATCH 62/62] add new ui files to Makefile --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 0081302b..e1c23e12 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ UUID = dash-to-panel@jderose9.github.com BASE_MODULES = extension.js stylesheet.css metadata.json COPYING README.md EXTRA_MODULES = appIcons.js panel.js panelManager.js proximity.js intellihide.js progress.js panelPositions.js panelSettings.js panelStyle.js overview.js taskbar.js transparency.js windowPreview.js prefs.js utils.js Settings.ui desktopIconsIntegration.js +UI_MODULES = ui/BoxAdvancedOptions.ui ui/BoxAnimateAppIconHoverOptions.ui ui/BoxDotOptions.ui ui/BoxDynamicOpacityOptions.ui ui/BoxGroupAppsOptions.ui ui/BoxIntellihideOptions.ui ui/BoxMiddleClickOptions.ui ui/BoxOverlayShortcut.ui ui/BoxScrollIconOptions.ui ui/BoxScrollPanelOptions.ui ui/BoxSecondaryMenuOptions.ui ui/BoxShowApplicationsOptions.ui ui/BoxShowDesktopOptions.ui ui/BoxWindowPreviewOptions.ui ui/SettingsAbout.ui ui/SettingsAction.ui ui/SettingsBehavior.ui ui/SettingsFineTune.ui ui/SettingsPosition.ui ui/SettingsStyle.ui + EXTRA_IMAGES = highlight_stacked_bg.svg highlight_stacked_bg_2.svg highlight_stacked_bg_3.svg TOLOCALIZE = prefs.js appIcons.js @@ -77,6 +79,8 @@ _build: all -rm -fR ./_build mkdir -p _build cp $(BASE_MODULES) $(EXTRA_MODULES) _build + mkdir -p _build/ui + cp $(UI_MODULES) _build/ui mkdir -p _build/img cd img ; cp $(EXTRA_IMAGES) ../_build/img/