mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 03:47:23 +01:00
Add empty page offering download
This commit is contained in:
parent
bf1ffef05a
commit
424c4c57a8
10 changed files with 295 additions and 9 deletions
|
|
@ -1,6 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="@PATH_ID@">
|
||||
<file preprocess="xml-stripblanks">icons/scalable/actions/library-symbolic.svg</file>
|
||||
<file preprocess="xml-stripblanks">icons/scalable/actions/music-note-symbolic.svg</file>
|
||||
<file preprocess="xml-stripblanks">icons/scalable/actions/playlist-symbolic.svg</file>
|
||||
<file compressed="true">style.css</file>
|
||||
|
|
|
|||
2
data/res/icons/scalable/actions/library-symbolic.svg
Normal file
2
data/res/icons/scalable/actions/library-symbolic.svg
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><g fill="#222222"><path d="m 1.5 2 h 2 c 0.277344 0 0.5 0.222656 0.5 0.5 v 12 c 0 0.277344 -0.222656 0.5 -0.5 0.5 h -2 c -0.277344 0 -0.5 -0.222656 -0.5 -0.5 v -12 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 z m 0 0"/><path d="m 5.5 4 h 1 c 0.277344 0 0.5 0.222656 0.5 0.5 v 10 c 0 0.277344 -0.222656 0.5 -0.5 0.5 h -1 c -0.277344 0 -0.5 -0.222656 -0.5 -0.5 v -10 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 z m 0 0"/><path d="m 8.5 3 h 1 c 0.277344 0 0.5 0.222656 0.5 0.5 v 11 c 0 0.277344 -0.222656 0.5 -0.5 0.5 h -1 c -0.277344 0 -0.5 -0.222656 -0.5 -0.5 v -11 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 z m 0 0"/><path d="m 10.707031 1.460938 l 0.964844 -0.261719 c 0.265625 -0.070313 0.539063 0.089843 0.613281 0.355469 l 3.363282 12.558593 c 0.070312 0.265625 -0.085938 0.539063 -0.351563 0.609375 l -0.96875 0.261719 c -0.265625 0.070313 -0.539063 -0.089844 -0.613281 -0.355469 l -3.363282 -12.554687 c -0.070312 -0.269531 0.085938 -0.542969 0.355469 -0.613281 z m 0 0"/></g></svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
72
data/ui/empty_page.blp
Normal file
72
data/ui/empty_page.blp
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusEmptyPage: Adw.NavigationPage {
|
||||
title: _("New Library");
|
||||
|
||||
Adw.ToolbarView {
|
||||
[top]
|
||||
Adw.HeaderBar header_bar {
|
||||
[end]
|
||||
MenuButton {
|
||||
icon-name: "open-menu-symbolic";
|
||||
menu-model: primary_menu;
|
||||
}
|
||||
}
|
||||
|
||||
Adw.StatusPage {
|
||||
icon-name: "library-symbolic";
|
||||
title: _("New Library");
|
||||
description: _("You can import your recordings by selecting \"Import music\" in the main menu. Musicus also comes with a small pre-made library of recordings. You can download it using the button below.");
|
||||
|
||||
child: Gtk.Box {
|
||||
orientation: vertical;
|
||||
|
||||
Gtk.Button download_button {
|
||||
halign: center;
|
||||
label: _("Download music");
|
||||
clicked => $download_library() swapped;
|
||||
|
||||
styles [
|
||||
"suggested-action",
|
||||
"pill",
|
||||
]
|
||||
}
|
||||
|
||||
Adw.Clamp {
|
||||
Gtk.ListBox process_list {
|
||||
selection-mode: none;
|
||||
margin-top: 12;
|
||||
visible: false;
|
||||
|
||||
styles [
|
||||
"boxed-list-separate",
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
menu primary_menu {
|
||||
item {
|
||||
label: _("_Import music");
|
||||
action: "win.import";
|
||||
}
|
||||
|
||||
item {
|
||||
label: _("_Library manager");
|
||||
action: "win.library";
|
||||
}
|
||||
|
||||
item {
|
||||
label: _("_Preferences");
|
||||
action: "win.preferences";
|
||||
}
|
||||
|
||||
item {
|
||||
label: _("_About Musicus");
|
||||
action: "app.about";
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ using Adw 1;
|
|||
template $MusicusPreferencesDialog: Adw.PreferencesDialog {
|
||||
Adw.PreferencesPage {
|
||||
title: _("Playback");
|
||||
icon-name: "media-playback-start-symbolic";
|
||||
|
||||
Adw.PreferencesGroup {
|
||||
title: _("Default program");
|
||||
|
|
@ -65,6 +66,7 @@ template $MusicusPreferencesDialog: Adw.PreferencesDialog {
|
|||
|
||||
Adw.PreferencesPage {
|
||||
title: _("Library");
|
||||
icon-name: "library-symbolic";
|
||||
|
||||
Adw.PreferencesGroup {
|
||||
title: _("Library download");
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
using Gtk 4.0;
|
||||
using Adw 1;
|
||||
|
||||
template $MusicusWelcomePage : Adw.NavigationPage {
|
||||
template $MusicusWelcomePage: Adw.NavigationPage {
|
||||
title: _("Welcome to Musicus");
|
||||
tag: "welcome";
|
||||
|
||||
|
|
@ -15,12 +15,17 @@ template $MusicusWelcomePage : Adw.NavigationPage {
|
|||
}
|
||||
}
|
||||
|
||||
Adw.StatusPage status_page {
|
||||
Adw.StatusPage {
|
||||
icon-name: "music-note-symbolic";
|
||||
title: _("Welcome to Musicus");
|
||||
description: _("Get started by choosing where you want to store your music library. Are you using Musicus for the first time? If so, create a new empty folder for your library. If you wish, Musicus will automatically download some music for you.");
|
||||
|
||||
child: Gtk.Button {
|
||||
styles ["suggested-action", "pill"]
|
||||
styles [
|
||||
"suggested-action",
|
||||
"pill",
|
||||
]
|
||||
|
||||
halign: center;
|
||||
label: _("Choose library folder");
|
||||
clicked => $choose_library_folder() swapped;
|
||||
|
|
@ -34,8 +39,9 @@ menu primary_menu {
|
|||
label: _("_Preferences");
|
||||
action: "win.preferences";
|
||||
}
|
||||
|
||||
item {
|
||||
label: _("_About Musicus");
|
||||
action: "app.about";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue