2024-05-31 13:39:27 +02:00
|
|
|
using Gtk 4.0;
|
|
|
|
|
using Adw 1;
|
|
|
|
|
|
|
|
|
|
template $MusicusRoleSelectorPopover: Gtk.Popover {
|
|
|
|
|
styles [
|
2025-03-29 17:29:29 +01:00
|
|
|
"selector",
|
2024-05-31 13:39:27 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
Adw.ToolbarView {
|
|
|
|
|
[top]
|
2025-03-29 17:29:29 +01:00
|
|
|
Gtk.Box {
|
|
|
|
|
spacing: 6;
|
2024-05-31 13:39:27 +02:00
|
|
|
margin-start: 8;
|
|
|
|
|
margin-end: 8;
|
|
|
|
|
margin-top: 8;
|
|
|
|
|
margin-bottom: 6;
|
2025-03-29 17:29:29 +01:00
|
|
|
|
|
|
|
|
Gtk.SearchEntry search_entry {
|
|
|
|
|
placeholder-text: _("Search roles…");
|
|
|
|
|
hexpand: true;
|
|
|
|
|
search-changed => $search_changed() swapped;
|
|
|
|
|
activate => $activate() swapped;
|
|
|
|
|
stop-search => $stop_search() swapped;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Gtk.Button {
|
|
|
|
|
icon-name: "edit-clear-symbolic";
|
|
|
|
|
tooltip-text: _("Reset to default role");
|
|
|
|
|
clicked => $reset_button_clicked() swapped;
|
|
|
|
|
|
|
|
|
|
styles [
|
|
|
|
|
"flat",
|
|
|
|
|
]
|
|
|
|
|
}
|
2024-05-31 13:39:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Gtk.ScrolledWindow scrolled_window {
|
|
|
|
|
height-request: 200;
|
|
|
|
|
|
|
|
|
|
Gtk.ListBox list_box {
|
|
|
|
|
styles [
|
2025-03-29 17:29:29 +01:00
|
|
|
"selector-list",
|
2024-05-31 13:39:27 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
selection-mode: none;
|
|
|
|
|
activate-on-single-click: true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|