Convert properties window to adw.dialog

This commit is contained in:
heliguy
2024-03-27 01:49:13 -04:00
parent 76a8e78502
commit e4e09a7b05
2 changed files with 6 additions and 9 deletions

View File

@@ -1,14 +1,13 @@
using Gtk 4.0;
using Adw 1;
template $PropertiesWindow: Adw.Window {
default-width: 350;
default-height: 600;
modal: true;
template $PropertiesWindow: Adw.Dialog {
content-width: 350;
content-height: 600;
Adw.ToolbarView main_toolbar_view {
[top]
HeaderBar header_bar {}
Adw.HeaderBar header_bar {}
content: Adw.ToastOverlay toast_overlay {
Box {

View File

@@ -6,7 +6,7 @@ import pathlib
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/../data/ui/properties.ui")
class PropertiesWindow(Adw.Window):
class PropertiesWindow(Adw.Dialog):
__gtype_name__ = "PropertiesWindow"
new_env = dict(os.environ)
@@ -226,6 +226,4 @@ class PropertiesWindow(Adw.Window):
self.generate_lower()
self.set_title(_("{} Properties").format(self.app_name))
self.set_size_request(260, 230)
self.set_transient_for(parent_window)
self.present()
self.present(parent_window)