This commit is contained in:
Erica Z 2024-10-20 18:25:40 +02:00
parent 48795a4d2f
commit fdd719f4f8
2 changed files with 112 additions and 105 deletions

View file

@ -10,11 +10,18 @@ template $UiPlaybar: Box {
[start]
Box {
Picture {
visible: bind template.show_cover_art;
valign: center;
halign: center;
AspectFrame {
visible: false; // FIXME annoying annoying annoying annoying
//visible: bind template.show_cover_art;
vexpand: true;
ratio: 1.0;
obey-child: false;
child: Picture {
content-fit: scale_down;
paintable: bind template.playing_cover_art;
};
}
Box {
@ -49,8 +56,7 @@ template $UiPlaybar: Box {
[center]
Box {
orientation: vertical;
halign: center;
hexpand: true;
valign: center;
CenterBox {
[start]

View file

@ -6,12 +6,9 @@ template $UiWindow: Adw.ApplicationWindow {
default-width: 800;
default-height: 600;
content: Adw.BottomSheet bottom_sheet {
can-open: false; // broken in libadwaita
[content]
Adw.ToolbarView {
margin-bottom: bind bottom_sheet.bottom-bar-height;
top-bar-style: raised;
bottom-bar-style: raised;
[top]
Adw.HeaderBar {
@ -35,6 +32,7 @@ template $UiWindow: Adw.ApplicationWindow {
}
content: Adw.ViewStack stack {
vexpand: true;
Adw.ViewStackPage {
icon-name: "media-optical-cd";
title: _("Albums");
@ -42,6 +40,7 @@ template $UiWindow: Adw.ApplicationWindow {
child: Adw.NavigationView {
Adw.NavigationPage {
title: _("Albums");
vexpand: true;
child: Adw.ToolbarView {
[top]
@ -61,7 +60,10 @@ template $UiWindow: Adw.ApplicationWindow {
}
}
ScrolledWindow {
vexpand: true;
GridView {}
}
};
}
};
@ -106,14 +108,13 @@ template $UiWindow: Adw.ApplicationWindow {
};
}
};
}
[bottom-bar]
[bottom]
$UiPlaybar playbar {
song: bind template.song;
playbin: bind template.playbin;
playing_cover_art: bind template.playing_cover_art;
show_cover_art: bind $show_playbar_cover_art (stack.visible-child-name) as <bool>;
}
};
}
}