From 9fe030ec357f4aa2479a327eeb5ddfe90a774964 Mon Sep 17 00:00:00 2001 From: Philipp Unger Date: Sat, 9 Apr 2022 00:04:04 +0200 Subject: [PATCH] migrate box show desktop options to adw preferences group --- prefs.js | 12 +- ui/BoxShowDesktopOptions.ui | 286 +++++++++++------------------------- 2 files changed, 97 insertions(+), 201 deletions(-) diff --git a/prefs.js b/prefs.js index cff63e4..8c8c6db 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 8b976db..f212d84 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 - 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 + center + True + + + + + center + + + + + 8 + 8 + 8 + + + + Reveal the desktop when hovering the Show Desktop button + + + + True + 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