mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
Improve playlist page design
This commit is contained in:
parent
b9c874ab8c
commit
09bedc892b
6 changed files with 56 additions and 37 deletions
|
|
@ -11,7 +11,9 @@ mod imp {
|
|||
#[template_child]
|
||||
pub playing_icon: TemplateChild<gtk::Image>,
|
||||
#[template_child]
|
||||
pub title_label: TemplateChild<gtk::Label>,
|
||||
pub composers_label: TemplateChild<gtk::Label>,
|
||||
#[template_child]
|
||||
pub work_label: TemplateChild<gtk::Label>,
|
||||
#[template_child]
|
||||
pub performances_label: TemplateChild<gtk::Label>,
|
||||
#[template_child]
|
||||
|
|
@ -59,12 +61,19 @@ impl PlaylistTile {
|
|||
|
||||
if let Some(item) = item {
|
||||
if item.is_title() {
|
||||
imp.title_label.set_label(&item.title());
|
||||
imp.title_label.set_visible(true);
|
||||
if let Some(composers) = item.composers() {
|
||||
imp.composers_label.set_label(&composers);
|
||||
imp.composers_label.set_visible(true);
|
||||
imp.work_label.set_margin_top(3);
|
||||
}
|
||||
|
||||
imp.work_label.set_label(&item.work());
|
||||
imp.work_label.set_visible(true);
|
||||
|
||||
if let Some(performances) = item.performers() {
|
||||
imp.performances_label.set_label(&performances);
|
||||
imp.performances_label.set_visible(true);
|
||||
imp.work_label.set_margin_bottom(6);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue