welcome page: Use correct icon name

This commit is contained in:
Elias Projahn 2025-01-16 12:53:12 +01:00
parent 6b71701b81
commit 3be2e4745c
2 changed files with 12 additions and 2 deletions

View file

@ -15,7 +15,7 @@ template $MusicusWelcomePage : Adw.NavigationPage {
} }
} }
Adw.StatusPage { Adw.StatusPage status_page {
icon-name: "de.johrpan.Musicus"; icon-name: "de.johrpan.Musicus";
title: _("Welcome to Musicus"); title: _("Welcome to Musicus");
description: _("Get started by choosing where to store your music library. Is this your first time using Musicus? If so, create a new empty folder for your library. Musicus will use this location to manage your recordings. You can also select a folder that already contains a music library created by Musicus."); description: _("Get started by choosing where to store your music library. Is this your first time using Musicus? If so, create a new empty folder for your library. Musicus will use this location to manage your recordings. You can also select a folder that already contains a music library created by Musicus.");

View file

@ -1,3 +1,5 @@
use crate::config;
use adw::subclass::{navigation_page::NavigationPageImpl, prelude::*}; use adw::subclass::{navigation_page::NavigationPageImpl, prelude::*};
use gettextrs::gettext; use gettextrs::gettext;
use gtk::{gio, glib, glib::subclass::Signal, prelude::*}; use gtk::{gio, glib, glib::subclass::Signal, prelude::*};
@ -8,7 +10,10 @@ mod imp {
#[derive(Debug, Default, gtk::CompositeTemplate)] #[derive(Debug, Default, gtk::CompositeTemplate)]
#[template(file = "data/ui/welcome_page.blp")] #[template(file = "data/ui/welcome_page.blp")]
pub struct MusicusWelcomePage {} pub struct MusicusWelcomePage {
#[template_child]
pub status_page: TemplateChild<adw::StatusPage>,
}
#[glib::object_subclass] #[glib::object_subclass]
impl ObjectSubclass for MusicusWelcomePage { impl ObjectSubclass for MusicusWelcomePage {
@ -36,6 +41,11 @@ mod imp {
SIGNALS.as_ref() SIGNALS.as_ref()
} }
fn constructed(&self) {
self.parent_constructed();
self.status_page.set_icon_name(Some(config::APP_ID));
}
} }
impl WidgetImpl for MusicusWelcomePage {} impl WidgetImpl for MusicusWelcomePage {}