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

View file

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