mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
editor: Add album editor
This commit is contained in:
parent
c4162fd98a
commit
a16dc446d6
8 changed files with 638 additions and 116 deletions
78
data/ui/album_editor.blp
Normal file
78
data/ui/album_editor.blp
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusAlbumEditor: Adw.NavigationPage {
|
||||
title: _("Album");
|
||||
|
||||
Adw.ToolbarView {
|
||||
[top]
|
||||
Adw.HeaderBar header_bar {}
|
||||
|
||||
Adw.Clamp {
|
||||
Gtk.Box {
|
||||
orientation: vertical;
|
||||
|
||||
Gtk.Label {
|
||||
label: _("Name");
|
||||
xalign: 0;
|
||||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
]
|
||||
}
|
||||
|
||||
$MusicusTranslationEditor name_editor {
|
||||
margin-top: 12;
|
||||
}
|
||||
|
||||
Gtk.Label {
|
||||
label: _("Recordings");
|
||||
xalign: 0;
|
||||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"heading"
|
||||
]
|
||||
}
|
||||
|
||||
Gtk.ListBox recordings_list {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
margin-bottom: 24;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
]
|
||||
|
||||
Adw.ActionRow {
|
||||
title: _("Add recording");
|
||||
activatable: true;
|
||||
activated => $select_recording() swapped;
|
||||
|
||||
[prefix]
|
||||
Gtk.Box select_recording_box {
|
||||
Gtk.Image {
|
||||
icon-name: "list-add-symbolic";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Gtk.ListBox {
|
||||
selection-mode: none;
|
||||
margin-top: 24;
|
||||
|
||||
styles [
|
||||
"boxed-list"
|
||||
]
|
||||
|
||||
Adw.ButtonRow save_row {
|
||||
title: _("Create album");
|
||||
activated => $save() swapped;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
42
data/ui/library_manager_albums_page.blp
Normal file
42
data/ui/library_manager_albums_page.blp
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
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