diff --git a/data/ui/no_plugin_window.blp b/data/ui/no_plugin_window.blp index 3b80b5349..b11b7f2ec 100644 --- a/data/ui/no_plugin_window.blp +++ b/data/ui/no_plugin_window.blp @@ -1,37 +1,19 @@ using Gtk 4.0; using Adw 1; -template GradienceNoPluginPrefWindow: Adw.Window { +template GradienceNoPluginPrefWindow : Adw.PreferencesWindow { title: _("Plugin Preferences"); - modal: true; - default-width: 400; + search-enabled: false; default-height: 400; - resizable: true; - deletable: true; - - ShortcutController { - Shortcut { - trigger: "Escape"; - action: "action(window.close)"; - } - } - - Adw.Leaflet leaflet { - can-unfold: false; - - Gtk.Box main_view { - orientation: vertical; - - Adw.HeaderBar titlebar { - styles ["flat"] - } + default-width: 400; + modal: true; - Adw.StatusPage { - name: "empty"; - icon-name: "action-unavailable-symbolic"; - title: _("No Preferences"); - description: _("This plugin doesn't have any preferences."); - } + Adw.PreferencesPage { + Adw.StatusPage { + name: "empty"; + icon-name: "action-unavailable-symbolic"; + title: _("No Preferences"); + description: _("This plugin doesn't have any preferences."); } } } diff --git a/gradience/frontend/views/no_plugin_window.py b/gradience/frontend/views/no_plugin_window.py index 63746e421..d0b057b14 100644 --- a/gradience/frontend/views/no_plugin_window.py +++ b/gradience/frontend/views/no_plugin_window.py @@ -22,7 +22,7 @@ @Gtk.Template(resource_path=f"{rootdir}/ui/no_plugin_window.ui") -class GradienceNoPluginPrefWindow(Adw.Window): +class GradienceNoPluginPrefWindow(Adw.PreferencesWindow): __gtype_name__ = "GradienceNoPluginPrefWindow" def __init__(self, **kwargs):