From 548d7659e103cd7ebe882dff8a94ddd1fb30431d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 1 Oct 2024 14:55:44 +0200 Subject: [PATCH] window-list: Switch to Adw.SwitchRow libadwaita fixed the actionable implementation of Adw.SwitchRow, so can use the convenience widget instead of composing our own. Part-of: --- extensions/window-list/prefs.js | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/extensions/window-list/prefs.js b/extensions/window-list/prefs.js index cf56be5b..0633d590 100644 --- a/extensions/window-list/prefs.js +++ b/extensions/window-list/prefs.js @@ -60,37 +60,22 @@ class WindowListPrefsWidget extends Adw.PreferencesPage { const miscGroup = new Adw.PreferencesGroup(); this.add(miscGroup); - let toggle = new Gtk.Switch({ - action_name: 'window-list.show-on-all-monitors', - valign: Gtk.Align.CENTER, - }); - let row = new Adw.ActionRow({ + let row = new Adw.SwitchRow({ title: _('Show on all monitors'), - activatable_widget: toggle, + action_name: 'window-list.show-on-all-monitors', }); - row.add_suffix(toggle); miscGroup.add(row); - toggle = new Gtk.Switch({ - action_name: 'window-list.display-all-workspaces', - valign: Gtk.Align.CENTER, - }); - row = new Adw.ActionRow({ + row = new Adw.SwitchRow({ title: _('Show windows from all workspaces'), - activatable_widget: toggle, + action_name: 'window-list.display-all-workspaces', }); - row.add_suffix(toggle); miscGroup.add(row); - toggle = new Gtk.Switch({ - action_name: 'window-list.embed-previews', - valign: Gtk.Align.CENTER, - }); - row = new Adw.ActionRow({ + row = new Adw.SwitchRow({ title: _('Show workspace previews'), - activatable_widget: toggle, + action_name: 'window-list.embed-previews', }); - row.add_suffix(toggle); miscGroup.add(row); } }