2024-10-10 10:12:43 +00:00
|
|
|
using Gtk 4.0;
|
|
|
|
using Adw 1;
|
|
|
|
|
2024-10-13 09:41:01 +00:00
|
|
|
template $UiWindow: Adw.ApplicationWindow {
|
2024-10-12 20:52:29 +00:00
|
|
|
title: _("audrey");
|
2024-10-10 10:12:43 +00:00
|
|
|
default-width: 800;
|
|
|
|
default-height: 600;
|
|
|
|
|
2024-10-19 13:05:43 +00:00
|
|
|
content: Adw.BottomSheet bottom_sheet {
|
2024-10-19 14:49:40 +00:00
|
|
|
can-open: false; // broken in libadwaita
|
|
|
|
|
2024-10-19 13:05:43 +00:00
|
|
|
[content]
|
2024-10-10 10:12:43 +00:00
|
|
|
Adw.OverlaySplitView {
|
2024-10-19 13:05:43 +00:00
|
|
|
margin-bottom: bind bottom_sheet.bottom-bar-height;
|
|
|
|
|
2024-10-10 10:12:43 +00:00
|
|
|
vexpand: true;
|
|
|
|
|
|
|
|
[sidebar]
|
|
|
|
Adw.NavigationPage {
|
|
|
|
width-request: 100;
|
2024-10-20 09:52:09 +00:00
|
|
|
title: _("audrey");
|
2024-10-10 10:12:43 +00:00
|
|
|
|
|
|
|
Adw.ToolbarView {
|
|
|
|
[top]
|
2024-10-12 19:06:15 +00:00
|
|
|
Adw.HeaderBar {
|
2024-10-20 09:52:09 +00:00
|
|
|
show-title: false;
|
|
|
|
|
2024-10-12 19:06:15 +00:00
|
|
|
[end]
|
|
|
|
Button {
|
|
|
|
icon-name: "applications-system";
|
|
|
|
clicked => $show_setup_dialog ();
|
|
|
|
}
|
|
|
|
}
|
2024-10-10 10:12:43 +00:00
|
|
|
|
|
|
|
content: Box {
|
|
|
|
orientation: vertical;
|
|
|
|
|
|
|
|
ListBox sidebar {
|
|
|
|
styles [
|
|
|
|
"navigation-sidebar",
|
|
|
|
]
|
|
|
|
|
2024-10-11 08:22:05 +00:00
|
|
|
row-activated => $on_sidebar_row_activated();
|
|
|
|
|
2024-10-10 10:12:43 +00:00
|
|
|
ListBoxRow sidebar_play_queue {
|
|
|
|
Label {
|
|
|
|
xalign: 0;
|
2024-10-10 10:16:23 +00:00
|
|
|
label: _("Play queue");
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Separator {}
|
|
|
|
|
|
|
|
ListBox {
|
|
|
|
selection-mode: none;
|
|
|
|
|
|
|
|
styles [
|
|
|
|
"navigation-sidebar",
|
|
|
|
]
|
|
|
|
|
2024-10-10 10:51:12 +00:00
|
|
|
Adw.ButtonRow shuffle_all_tracks {
|
2024-10-10 10:16:23 +00:00
|
|
|
title: _("Shuffle all tracks");
|
2024-10-10 10:12:43 +00:00
|
|
|
start-icon-name: "media-playlist-shuffle";
|
2024-10-10 10:51:12 +00:00
|
|
|
sensitive: false;
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|
|
|
|
}
|
2024-10-12 18:08:20 +00:00
|
|
|
|
|
|
|
Separator {
|
|
|
|
styles [
|
|
|
|
"spacer",
|
|
|
|
]
|
|
|
|
vexpand: true;
|
|
|
|
}
|
|
|
|
|
|
|
|
Picture {
|
2024-10-13 15:21:29 +00:00
|
|
|
paintable: bind template.playing_cover_art;
|
2024-10-12 18:08:20 +00:00
|
|
|
}
|
2024-10-10 10:12:43 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
[content]
|
|
|
|
Stack stack {
|
|
|
|
StackPage {
|
|
|
|
name: "play_queue";
|
2024-10-10 10:16:23 +00:00
|
|
|
title: _("Play queue");
|
2024-10-10 10:12:43 +00:00
|
|
|
|
2024-10-15 11:27:47 +00:00
|
|
|
child: $UiPlayQueue play_queue {
|
2024-10-19 11:29:39 +00:00
|
|
|
playbin: bind template.playbin;
|
2024-10-15 11:27:47 +00:00
|
|
|
};
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-10-19 13:05:43 +00:00
|
|
|
[bottom-bar]
|
2024-10-19 15:04:56 +00:00
|
|
|
$UiPlaybar playbar {
|
|
|
|
song: bind template.song;
|
|
|
|
playbin: bind template.playbin;
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|