Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
feat: Port no_plugin_window to PreferencesWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
daudix committed Apr 15, 2023
1 parent f4c7a82 commit 08c16f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 29 deletions.
38 changes: 10 additions & 28 deletions data/ui/no_plugin_window.blp
Original file line number Diff line number Diff line change
@@ -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.");
}
}
}
2 changes: 1 addition & 1 deletion gradience/frontend/views/no_plugin_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 08c16f4

Please sign in to comment.