From 2d34fbe2e7b9ff1c813600ada91a6948d47b10f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 7 Dec 2023 19:10:40 +0100 Subject: [PATCH] extensions-app: Use banner instead of action bar Action bars have largely gone out of fashion, and Banner is an appropriate replacement in our case, so switch to that. Part-of: --- .../data/ui/extensions-window.ui | 120 ++++++------------ subprojects/extensions-app/js/main.js | 7 +- 2 files changed, 44 insertions(+), 83 deletions(-) diff --git a/subprojects/extensions-app/data/ui/extensions-window.ui b/subprojects/extensions-app/data/ui/extensions-window.ui index 336149a1f..ac682f044 100644 --- a/subprojects/extensions-app/data/ui/extensions-window.ui +++ b/subprojects/extensions-app/data/ui/extensions-window.ui @@ -74,47 +74,58 @@ main - + + vertical - + + Log Out… + win.logout + + + + - - Extensions - Extensions can cause performance and stability issues. Disable extensions if you encounter problems with your system. - enabledSwitch + - - win.user-extensions-enabled - center + + Extensions + Extensions can cause performance and stability issues. Disable extensions if you encounter problems with your system. + enabledSwitch + + + win.user-extensions-enabled + center + + - - - - - Manually Installed - To find and add extensions, visit <a href="https://extensions.gnome.org">extensions.gnome.org</a>. - - none - + + Manually Installed + To find and add extensions, visit <a href="https://extensions.gnome.org">extensions.gnome.org</a>. + + + none + + + - - - - - Built-In - - none - + + Built-In + + + none + + + @@ -148,55 +159,6 @@ - - - False - - - 24 - 6 - 6 - 6 - 6 - software-update-available-symbolic - - - - - - vertical - center - - - start - Extension Updates Ready - - - - - - start - - - - - - - Log Out… - center - win.logout - True - - - - - diff --git a/subprojects/extensions-app/js/main.js b/subprojects/extensions-app/js/main.js index 0853a8930..529db5c54 100644 --- a/subprojects/extensions-app/js/main.js +++ b/subprojects/extensions-app/js/main.js @@ -88,8 +88,7 @@ var ExtensionsWindow = GObject.registerClass({ 'searchBar', 'searchButton', 'searchEntry', - 'updatesBar', - 'updatesLabel', + 'updatesBanner', ], }, class ExtensionsWindow extends Adw.ApplicationWindow { _init(params) { @@ -341,11 +340,11 @@ var ExtensionsWindow = GObject.registerClass({ _checkUpdates() { let nUpdates = [...this._userList].filter(c => c.hasUpdate).length; - this._updatesLabel.label = Gettext.ngettext( + this._updatesBanner.title = Gettext.ngettext( '%d extension will be updated on next login.', '%d extensions will be updated on next login.', nUpdates).format(nUpdates); - this._updatesBar.revealed = nUpdates > 0; + this._updatesBanner.revealed = nUpdates > 0; } _extensionsLoaded() {