mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
Refactor module layout
This commit is contained in:
parent
e59052a362
commit
5956b7ff15
70 changed files with 757 additions and 841 deletions
35
data/ui/selector/ensemble.blp
Normal file
35
data/ui/selector/ensemble.blp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusEnsembleSelectorPopover: Gtk.Popover {
|
||||
styles [
|
||||
"selector"
|
||||
]
|
||||
|
||||
Adw.ToolbarView {
|
||||
[top]
|
||||
Gtk.SearchEntry search_entry {
|
||||
placeholder-text: _("Search ensembles…");
|
||||
margin-start: 8;
|
||||
margin-end: 8;
|
||||
margin-top: 8;
|
||||
margin-bottom: 6;
|
||||
search-changed => $search_changed() swapped;
|
||||
activate => $activate() swapped;
|
||||
stop-search => $stop_search() swapped;
|
||||
}
|
||||
|
||||
Gtk.ScrolledWindow scrolled_window {
|
||||
height-request: 200;
|
||||
|
||||
Gtk.ListBox list_box {
|
||||
styles [
|
||||
"selector-list"
|
||||
]
|
||||
|
||||
selection-mode: none;
|
||||
activate-on-single-click: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
35
data/ui/selector/instrument.blp
Normal file
35
data/ui/selector/instrument.blp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusInstrumentSelectorPopover: Gtk.Popover {
|
||||
styles [
|
||||
"selector"
|
||||
]
|
||||
|
||||
Adw.ToolbarView {
|
||||
[top]
|
||||
Gtk.SearchEntry search_entry {
|
||||
placeholder-text: _("Search instruments…");
|
||||
margin-start: 8;
|
||||
margin-end: 8;
|
||||
margin-top: 8;
|
||||
margin-bottom: 6;
|
||||
search-changed => $search_changed() swapped;
|
||||
activate => $activate() swapped;
|
||||
stop-search => $stop_search() swapped;
|
||||
}
|
||||
|
||||
Gtk.ScrolledWindow scrolled_window {
|
||||
height-request: 200;
|
||||
|
||||
Gtk.ListBox list_box {
|
||||
styles [
|
||||
"selector-list"
|
||||
]
|
||||
|
||||
selection-mode: none;
|
||||
activate-on-single-click: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
94
data/ui/selector/performer_role.blp
Normal file
94
data/ui/selector/performer_role.blp
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusPerformerRoleSelectorPopover: Gtk.Popover {
|
||||
styles [
|
||||
"selector"
|
||||
]
|
||||
|
||||
Gtk.Stack stack {
|
||||
transition-type: slide_left_right;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Gtk.ScrolledWindow role_scrolled_window {
|
||||
height-request: 200;
|
||||
|
||||
Gtk.ListBox role_list {
|
||||
styles [
|
||||
"selector-list"
|
||||
]
|
||||
|
||||
selection-mode: none;
|
||||
activate-on-single-click: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ToolbarView instrument_view {
|
||||
[top]
|
||||
Gtk.Box {
|
||||
margin-start: 8;
|
||||
margin-end: 8;
|
||||
margin-top: 8;
|
||||
margin-bottom: 6;
|
||||
orientation: vertical;
|
||||
|
||||
Gtk.CenterBox {
|
||||
[start]
|
||||
Gtk.Button {
|
||||
styles [
|
||||
"flat"
|
||||
]
|
||||
|
||||
icon-name: "go-previous-symbolic";
|
||||
clicked => $back_button_clicked() swapped;
|
||||
}
|
||||
|
||||
[center]
|
||||
Gtk.Label {
|
||||
styles [
|
||||
"heading"
|
||||
]
|
||||
|
||||
label: _("Performer");
|
||||
ellipsize: end;
|
||||
margin-start: 6;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.SearchEntry instrument_search_entry {
|
||||
placeholder-text: _("Search instruments…");
|
||||
margin-top: 6;
|
||||
search-changed => $instrument_search_changed() swapped;
|
||||
activate => $instrument_activate() swapped;
|
||||
stop-search => $stop_search() swapped;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.ScrolledWindow instrument_scrolled_window {
|
||||
height-request: 200;
|
||||
|
||||
Gtk.ListBox instrument_list {
|
||||
styles [
|
||||
"selector-list"
|
||||
]
|
||||
|
||||
selection-mode: none;
|
||||
activate-on-single-click: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
35
data/ui/selector/person.blp
Normal file
35
data/ui/selector/person.blp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusPersonSelectorPopover: Gtk.Popover {
|
||||
styles [
|
||||
"selector"
|
||||
]
|
||||
|
||||
Adw.ToolbarView {
|
||||
[top]
|
||||
Gtk.SearchEntry search_entry {
|
||||
placeholder-text: _("Search persons…");
|
||||
margin-start: 8;
|
||||
margin-end: 8;
|
||||
margin-top: 8;
|
||||
margin-bottom: 6;
|
||||
search-changed => $search_changed() swapped;
|
||||
activate => $activate() swapped;
|
||||
stop-search => $stop_search() swapped;
|
||||
}
|
||||
|
||||
Gtk.ScrolledWindow scrolled_window {
|
||||
height-request: 200;
|
||||
|
||||
Gtk.ListBox list_box {
|
||||
styles [
|
||||
"selector-list"
|
||||
]
|
||||
|
||||
selection-mode: none;
|
||||
activate-on-single-click: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
147
data/ui/selector/recording.blp
Normal file
147
data/ui/selector/recording.blp
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusRecordingSelectorPopover: Gtk.Popover {
|
||||
styles [
|
||||
"selector"
|
||||
]
|
||||
|
||||
Gtk.Stack stack {
|
||||
transition-type: slide_left_right;
|
||||
|
||||
Adw.ToolbarView composer_view {
|
||||
[top]
|
||||
Gtk.SearchEntry composer_search_entry {
|
||||
placeholder-text: _("Search composers…");
|
||||
margin-start: 8;
|
||||
margin-end: 8;
|
||||
margin-top: 8;
|
||||
margin-bottom: 6;
|
||||
search-changed => $composer_search_changed() swapped;
|
||||
activate => $composer_activate() swapped;
|
||||
stop-search => $stop_search() swapped;
|
||||
}
|
||||
|
||||
Gtk.ScrolledWindow composer_scrolled_window {
|
||||
height-request: 200;
|
||||
|
||||
Gtk.ListBox composer_list {
|
||||
styles [
|
||||
"selector-list"
|
||||
]
|
||||
|
||||
selection-mode: none;
|
||||
activate-on-single-click: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ToolbarView work_view {
|
||||
[top]
|
||||
Gtk.Box {
|
||||
margin-start: 8;
|
||||
margin-end: 8;
|
||||
margin-top: 8;
|
||||
margin-bottom: 6;
|
||||
orientation: vertical;
|
||||
|
||||
Gtk.CenterBox {
|
||||
[start]
|
||||
Gtk.Button {
|
||||
styles [
|
||||
"flat"
|
||||
]
|
||||
|
||||
icon-name: "go-previous-symbolic";
|
||||
clicked => $back_to_composer() swapped;
|
||||
}
|
||||
|
||||
[center]
|
||||
Gtk.Label composer_label {
|
||||
styles [
|
||||
"heading"
|
||||
]
|
||||
|
||||
ellipsize: end;
|
||||
margin-start: 6;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.SearchEntry work_search_entry {
|
||||
placeholder-text: _("Search works…");
|
||||
margin-top: 6;
|
||||
search-changed => $work_search_changed() swapped;
|
||||
activate => $work_activate() swapped;
|
||||
stop-search => $stop_search() swapped;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.ScrolledWindow work_scrolled_window {
|
||||
height-request: 200;
|
||||
|
||||
Gtk.ListBox work_list {
|
||||
styles [
|
||||
"selector-list"
|
||||
]
|
||||
|
||||
selection-mode: none;
|
||||
activate-on-single-click: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ToolbarView recording_view {
|
||||
[top]
|
||||
Gtk.Box {
|
||||
margin-start: 8;
|
||||
margin-end: 8;
|
||||
margin-top: 8;
|
||||
margin-bottom: 6;
|
||||
orientation: vertical;
|
||||
|
||||
Gtk.CenterBox {
|
||||
[start]
|
||||
Gtk.Button {
|
||||
styles [
|
||||
"flat"
|
||||
]
|
||||
|
||||
icon-name: "go-previous-symbolic";
|
||||
clicked => $back_to_work() swapped;
|
||||
}
|
||||
|
||||
[center]
|
||||
Gtk.Label work_label {
|
||||
styles [
|
||||
"heading"
|
||||
]
|
||||
|
||||
ellipsize: end;
|
||||
margin-start: 6;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.SearchEntry recording_search_entry {
|
||||
placeholder-text: _("Search recordings…");
|
||||
margin-top: 6;
|
||||
search-changed => $recording_search_changed() swapped;
|
||||
activate => $recording_activate() swapped;
|
||||
stop-search => $stop_search() swapped;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.ScrolledWindow recording_scrolled_window {
|
||||
height-request: 200;
|
||||
|
||||
Gtk.ListBox recording_list {
|
||||
styles [
|
||||
"selector-list"
|
||||
]
|
||||
|
||||
selection-mode: none;
|
||||
activate-on-single-click: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
35
data/ui/selector/role.blp
Normal file
35
data/ui/selector/role.blp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusRoleSelectorPopover: Gtk.Popover {
|
||||
styles [
|
||||
"selector"
|
||||
]
|
||||
|
||||
Adw.ToolbarView {
|
||||
[top]
|
||||
Gtk.SearchEntry search_entry {
|
||||
placeholder-text: _("Search roles…");
|
||||
margin-start: 8;
|
||||
margin-end: 8;
|
||||
margin-top: 8;
|
||||
margin-bottom: 6;
|
||||
search-changed => $search_changed() swapped;
|
||||
activate => $activate() swapped;
|
||||
stop-search => $stop_search() swapped;
|
||||
}
|
||||
|
||||
Gtk.ScrolledWindow scrolled_window {
|
||||
height-request: 200;
|
||||
|
||||
Gtk.ListBox list_box {
|
||||
styles [
|
||||
"selector-list"
|
||||
]
|
||||
|
||||
selection-mode: none;
|
||||
activate-on-single-click: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
93
data/ui/selector/work.blp
Normal file
93
data/ui/selector/work.blp
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusWorkSelectorPopover: Gtk.Popover {
|
||||
styles [
|
||||
"selector"
|
||||
]
|
||||
|
||||
Gtk.Stack stack {
|
||||
transition-type: slide_left_right;
|
||||
|
||||
Adw.ToolbarView composer_view {
|
||||
[top]
|
||||
Gtk.SearchEntry composer_search_entry {
|
||||
placeholder-text: _("Search composers…");
|
||||
margin-start: 8;
|
||||
margin-end: 8;
|
||||
margin-top: 8;
|
||||
margin-bottom: 6;
|
||||
search-changed => $composer_search_changed() swapped;
|
||||
activate => $composer_activate() swapped;
|
||||
stop-search => $stop_search() swapped;
|
||||
}
|
||||
|
||||
Gtk.ScrolledWindow composer_scrolled_window {
|
||||
height-request: 200;
|
||||
|
||||
Gtk.ListBox composer_list {
|
||||
styles [
|
||||
"selector-list"
|
||||
]
|
||||
|
||||
selection-mode: none;
|
||||
activate-on-single-click: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ToolbarView work_view {
|
||||
[top]
|
||||
Gtk.Box {
|
||||
margin-start: 8;
|
||||
margin-end: 8;
|
||||
margin-top: 8;
|
||||
margin-bottom: 6;
|
||||
orientation: vertical;
|
||||
|
||||
Gtk.CenterBox {
|
||||
[start]
|
||||
Gtk.Button {
|
||||
styles [
|
||||
"flat"
|
||||
]
|
||||
|
||||
icon-name: "go-previous-symbolic";
|
||||
clicked => $back_button_clicked() swapped;
|
||||
}
|
||||
|
||||
[center]
|
||||
Gtk.Label composer_label {
|
||||
styles [
|
||||
"heading"
|
||||
]
|
||||
|
||||
ellipsize: end;
|
||||
margin-start: 6;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.SearchEntry work_search_entry {
|
||||
placeholder-text: _("Search works…");
|
||||
margin-top: 6;
|
||||
search-changed => $work_search_changed() swapped;
|
||||
activate => $work_activate() swapped;
|
||||
stop-search => $stop_search() swapped;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.ScrolledWindow work_scrolled_window {
|
||||
height-request: 200;
|
||||
|
||||
Gtk.ListBox work_list {
|
||||
styles [
|
||||
"selector-list"
|
||||
]
|
||||
|
||||
selection-mode: none;
|
||||
activate-on-single-click: true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue