mirror of
https://github.com/morgan9e/warehouse
synced 2026-04-14 00:04:08 +09:00
Convert filter window to an adw.dialog
This commit is contained in:
@@ -1,16 +1,15 @@
|
||||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $FilterWindow: Adw.Window {
|
||||
default-width: 500;
|
||||
default-height: 450;
|
||||
template $FilterWindow: Adw.Dialog {
|
||||
title: _("Set Filters");
|
||||
modal: true;
|
||||
content-width: 500;
|
||||
content-height: 450;
|
||||
|
||||
child:
|
||||
Adw.ToolbarView main_toolbar_view {
|
||||
[top]
|
||||
HeaderBar header_bar {
|
||||
show-title-buttons: true;
|
||||
Adw.HeaderBar header_bar {
|
||||
}
|
||||
|
||||
content: Adw.ToastOverlay toast_overlay {
|
||||
@@ -80,5 +79,5 @@ template $FilterWindow: Adw.Window {
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import pathlib
|
||||
|
||||
|
||||
@Gtk.Template(resource_path="/io/github/flattool/Warehouse/../data/ui/filter.ui")
|
||||
class FilterWindow(Adw.Window):
|
||||
class FilterWindow(Adw.Dialog):
|
||||
__gtype_name__ = "FilterWindow"
|
||||
|
||||
show_apps_switch = Gtk.Template.Child()
|
||||
@@ -196,9 +196,7 @@ class FilterWindow(Adw.Window):
|
||||
self.total_runtimes_selected = 0
|
||||
|
||||
# Window Things
|
||||
self.set_transient_for(main_window)
|
||||
self.add_controller(event_controller)
|
||||
self.set_size_request(260, 230)
|
||||
|
||||
self.show_apps_switch.set_active(self.settings.get_boolean("show-apps"))
|
||||
self.show_runtimes_switch.set_active(self.settings.get_boolean("show-runtimes"))
|
||||
@@ -226,4 +224,4 @@ class FilterWindow(Adw.Window):
|
||||
else:
|
||||
self.generate_runtimes()
|
||||
self.check_is_resetable()
|
||||
self.present()
|
||||
self.present(main_window)
|
||||
|
||||
@@ -23,7 +23,7 @@ import re
|
||||
import time
|
||||
|
||||
from gi.repository import Adw, Gdk, Gio, GLib, Gtk
|
||||
from .properties_window import PropertiesWindow
|
||||
# from .properties_window import PropertiesWindow
|
||||
from .filter_window import FilterWindow
|
||||
from .common import myUtils
|
||||
from .remotes_window import RemotesWindow
|
||||
|
||||
Reference in New Issue
Block a user