2025-01-15 11:23:04 +01:00
|
|
|
using Gtk 4.0;
|
|
|
|
|
using Adw 1;
|
|
|
|
|
|
|
|
|
|
template $MusicusPerformerRoleSelectorPopover: Gtk.Popover {
|
|
|
|
|
styles [
|
2025-03-29 17:29:29 +01:00
|
|
|
"selector",
|
2025-01-15 11:23:04 +01:00
|
|
|
]
|
|
|
|
|
|
2025-03-29 17:29:29 +01:00
|
|
|
Gtk.Box {
|
|
|
|
|
orientation: vertical;
|
|
|
|
|
|
|
|
|
|
Gtk.CenterBox {
|
|
|
|
|
margin-start: 6;
|
|
|
|
|
margin-end: 6;
|
|
|
|
|
margin-top: 6;
|
2025-01-15 11:23:04 +01:00
|
|
|
|
2025-03-29 17:29:29 +01:00
|
|
|
[center]
|
|
|
|
|
Adw.InlineViewSwitcher {
|
|
|
|
|
stack: stack;
|
|
|
|
|
}
|
2025-01-15 11:23:04 +01:00
|
|
|
|
2025-03-29 17:29:29 +01:00
|
|
|
[end]
|
|
|
|
|
Gtk.Button {
|
|
|
|
|
icon-name: "edit-clear-symbolic";
|
|
|
|
|
tooltip-text: _("Reset to default role");
|
|
|
|
|
margin-start: 6;
|
|
|
|
|
clicked => $reset_button_clicked() swapped;
|
2025-01-15 11:23:04 +01:00
|
|
|
|
2025-03-29 17:29:29 +01:00
|
|
|
styles [
|
|
|
|
|
"flat",
|
|
|
|
|
]
|
2025-01-15 11:23:04 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-03-29 17:29:29 +01:00
|
|
|
Adw.ViewStack stack {
|
|
|
|
|
Adw.ViewStackPage {
|
|
|
|
|
name: "role";
|
|
|
|
|
title: _("Role");
|
|
|
|
|
|
|
|
|
|
child: Adw.ToolbarView role_view {
|
|
|
|
|
[top]
|
|
|
|
|
Gtk.SearchEntry role_search_entry {
|
|
|
|
|
placeholder-text: _("Search roles…");
|
|
|
|
|
margin-start: 8;
|
|
|
|
|
margin-end: 8;
|
|
|
|
|
margin-top: 8;
|
|
|
|
|
margin-bottom: 6;
|
|
|
|
|
search-changed => $role_search_changed() swapped;
|
|
|
|
|
activate => $role_activate() swapped;
|
|
|
|
|
stop-search => $stop_search() swapped;
|
2025-01-15 11:23:04 +01:00
|
|
|
}
|
|
|
|
|
|
2025-03-29 17:29:29 +01:00
|
|
|
Gtk.ScrolledWindow role_scrolled_window {
|
|
|
|
|
height-request: 200;
|
|
|
|
|
|
|
|
|
|
Gtk.ListBox role_list {
|
|
|
|
|
styles [
|
|
|
|
|
"selector-list",
|
|
|
|
|
]
|
2025-01-15 11:23:04 +01:00
|
|
|
|
2025-03-29 17:29:29 +01:00
|
|
|
selection-mode: none;
|
|
|
|
|
activate-on-single-click: true;
|
|
|
|
|
}
|
2025-01-15 11:23:04 +01:00
|
|
|
}
|
2025-03-29 17:29:29 +01:00
|
|
|
};
|
2025-01-15 11:23:04 +01:00
|
|
|
}
|
|
|
|
|
|
2025-03-29 17:29:29 +01:00
|
|
|
Adw.ViewStackPage {
|
|
|
|
|
name: "instrument";
|
|
|
|
|
title: _("Instrument");
|
2025-01-15 11:23:04 +01:00
|
|
|
|
2025-03-29 17:29:29 +01:00
|
|
|
child: Adw.ToolbarView instrument_view {
|
|
|
|
|
[top]
|
|
|
|
|
Gtk.SearchEntry instrument_search_entry {
|
|
|
|
|
placeholder-text: _("Search instruments…");
|
|
|
|
|
margin-start: 8;
|
|
|
|
|
margin-end: 8;
|
|
|
|
|
margin-top: 8;
|
|
|
|
|
margin-bottom: 6;
|
|
|
|
|
search-changed => $instrument_search_changed() swapped;
|
|
|
|
|
activate => $instrument_activate() swapped;
|
|
|
|
|
stop-search => $stop_search() swapped;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Gtk.ScrolledWindow instrument_scrolled_window {
|
|
|
|
|
height-request: 200;
|
2025-01-15 11:23:04 +01:00
|
|
|
|
2025-03-29 17:29:29 +01:00
|
|
|
Gtk.ListBox instrument_list {
|
|
|
|
|
styles [
|
|
|
|
|
"selector-list",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
selection-mode: none;
|
|
|
|
|
activate-on-single-click: true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
2025-01-15 11:23:04 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|