mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 03:47:23 +01:00
Simplify library manager
This commit is contained in:
parent
610a3d8ff9
commit
d49b9a9efe
5 changed files with 95 additions and 643 deletions
|
|
@ -23,7 +23,7 @@ template $MusicusLibraryManager: Adw.NavigationPage {
|
|||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
"heading",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ template $MusicusLibraryManager: Adw.NavigationPage {
|
|||
margin-top: 12;
|
||||
|
||||
styles [
|
||||
"boxed-list-separate"
|
||||
"boxed-list-separate",
|
||||
]
|
||||
|
||||
Adw.ActionRow library_path_row {
|
||||
|
|
@ -41,7 +41,7 @@ template $MusicusLibraryManager: Adw.NavigationPage {
|
|||
activated => $open_library() swapped;
|
||||
|
||||
styles [
|
||||
"property"
|
||||
"property",
|
||||
]
|
||||
|
||||
[suffix]
|
||||
|
|
@ -62,232 +62,6 @@ template $MusicusLibraryManager: Adw.NavigationPage {
|
|||
activated => $export_archive() swapped;
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.Label {
|
||||
label: _("Contents");
|
||||
xalign: 0;
|
||||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
]
|
||||
}
|
||||
|
||||
Gtk.ListBox {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
]
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Persons");
|
||||
activatable: true;
|
||||
activated => $show_persons() swapped;
|
||||
|
||||
[suffix]
|
||||
Gtk.Box {
|
||||
spacing: 6;
|
||||
|
||||
Gtk.Label n_persons_label {
|
||||
label: "0";
|
||||
|
||||
styles [
|
||||
"numeric"
|
||||
]
|
||||
}
|
||||
|
||||
Gtk.Image {
|
||||
icon-name: "go-next-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Roles");
|
||||
activatable: true;
|
||||
activated => $show_roles() swapped;
|
||||
|
||||
[suffix]
|
||||
Gtk.Box {
|
||||
spacing: 6;
|
||||
|
||||
Gtk.Label n_roles_label {
|
||||
label: "0";
|
||||
|
||||
styles [
|
||||
"numeric"
|
||||
]
|
||||
}
|
||||
|
||||
Gtk.Image {
|
||||
icon-name: "go-next-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Instruments");
|
||||
activatable: true;
|
||||
activated => $show_instruments() swapped;
|
||||
|
||||
[suffix]
|
||||
Gtk.Box {
|
||||
spacing: 6;
|
||||
|
||||
Gtk.Label n_instruments_label {
|
||||
label: "0";
|
||||
|
||||
styles [
|
||||
"numeric"
|
||||
]
|
||||
}
|
||||
|
||||
Gtk.Image {
|
||||
icon-name: "go-next-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Works");
|
||||
activatable: true;
|
||||
activated => $show_works() swapped;
|
||||
|
||||
[suffix]
|
||||
Gtk.Box {
|
||||
spacing: 6;
|
||||
|
||||
Gtk.Label n_works_label {
|
||||
label: "0";
|
||||
|
||||
styles [
|
||||
"numeric"
|
||||
]
|
||||
}
|
||||
|
||||
Gtk.Image {
|
||||
icon-name: "go-next-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Ensembles");
|
||||
activatable: true;
|
||||
activated => $show_ensembles() swapped;
|
||||
|
||||
[suffix]
|
||||
Gtk.Box {
|
||||
spacing: 6;
|
||||
|
||||
Gtk.Label n_ensembles_label {
|
||||
label: "0";
|
||||
|
||||
styles [
|
||||
"numeric"
|
||||
]
|
||||
}
|
||||
|
||||
Gtk.Image {
|
||||
icon-name: "go-next-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Recordings");
|
||||
activatable: true;
|
||||
activated => $show_recordings() swapped;
|
||||
|
||||
[suffix]
|
||||
Gtk.Box {
|
||||
spacing: 6;
|
||||
|
||||
Gtk.Label n_recordings_label {
|
||||
label: "0";
|
||||
|
||||
styles [
|
||||
"numeric"
|
||||
]
|
||||
}
|
||||
|
||||
Gtk.Image {
|
||||
icon-name: "go-next-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Tracks");
|
||||
activatable: true;
|
||||
activated => $show_tracks() swapped;
|
||||
|
||||
[suffix]
|
||||
Gtk.Box {
|
||||
spacing: 6;
|
||||
|
||||
Gtk.Label n_tracks_label {
|
||||
label: "0";
|
||||
|
||||
styles [
|
||||
"numeric"
|
||||
]
|
||||
}
|
||||
|
||||
Gtk.Image {
|
||||
icon-name: "go-next-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Mediums");
|
||||
activatable: true;
|
||||
activated => $show_mediums() swapped;
|
||||
|
||||
[suffix]
|
||||
Gtk.Box {
|
||||
spacing: 6;
|
||||
|
||||
Gtk.Label n_mediums_label {
|
||||
label: "0";
|
||||
|
||||
styles [
|
||||
"numeric"
|
||||
]
|
||||
}
|
||||
|
||||
Gtk.Image {
|
||||
icon-name: "go-next-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Albums");
|
||||
activatable: true;
|
||||
activated => $show_albums() swapped;
|
||||
|
||||
[suffix]
|
||||
Gtk.Box {
|
||||
spacing: 6;
|
||||
|
||||
Gtk.Label n_albums_label {
|
||||
label: "0";
|
||||
|
||||
styles [
|
||||
"numeric"
|
||||
]
|
||||
}
|
||||
|
||||
Gtk.Image {
|
||||
icon-name: "go-next-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,42 +0,0 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusLibraryManagerAlbumsPage: Adw.NavigationPage {
|
||||
title: _("Albums");
|
||||
|
||||
Adw.ToolbarView {
|
||||
[top]
|
||||
Gtk.Box {
|
||||
orientation: vertical;
|
||||
|
||||
Adw.HeaderBar {
|
||||
[end]
|
||||
Gtk.Button {
|
||||
icon-name: "list-add-symbolic";
|
||||
clicked => $create() swapped;
|
||||
}
|
||||
}
|
||||
|
||||
Adw.Clamp {
|
||||
Gtk.SearchEntry search_entry {
|
||||
placeholder-text: _("Search albums…");
|
||||
search-changed => $search_changed() swapped;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.ScrolledWindow {
|
||||
Adw.Clamp {
|
||||
Gtk.ListBox list {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
valign: start;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue