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-20 13:30:22 +00:00
|
|
|
Adw.ToolbarView {
|
2024-10-19 13:05:43 +00:00
|
|
|
margin-bottom: bind bottom_sheet.bottom-bar-height;
|
|
|
|
|
2024-10-20 13:30:22 +00:00
|
|
|
[top]
|
|
|
|
Adw.HeaderBar {
|
|
|
|
[start]
|
|
|
|
Button {
|
|
|
|
icon-name: "media-playlist-shuffle";
|
|
|
|
sensitive: bind template.can_click_shuffle_all;
|
|
|
|
clicked => $shuffle_all ();
|
|
|
|
}
|
2024-10-12 18:08:20 +00:00
|
|
|
|
2024-10-20 13:30:22 +00:00
|
|
|
title-widget: Adw.ViewSwitcher {
|
|
|
|
stack: stack;
|
|
|
|
policy: wide;
|
|
|
|
};
|
2024-10-12 18:08:20 +00:00
|
|
|
|
2024-10-20 13:30:22 +00:00
|
|
|
[end]
|
|
|
|
Button {
|
|
|
|
icon-name: "applications-system";
|
|
|
|
clicked => $show_setup_dialog ();
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-10-20 13:30:22 +00:00
|
|
|
content: Adw.ViewStack stack {
|
|
|
|
Adw.ViewStackPage {
|
2024-10-10 10:16:23 +00:00
|
|
|
title: _("Play queue");
|
2024-10-20 13:30:22 +00:00
|
|
|
icon-name: "media-playback-start";
|
2024-10-10 10:12:43 +00:00
|
|
|
|
2024-10-20 14:15:22 +00:00
|
|
|
child: Box {
|
|
|
|
name: "play-queue-page";
|
|
|
|
homogeneous: true;
|
|
|
|
|
|
|
|
Adw.Clamp {
|
|
|
|
halign: center;
|
2024-10-20 14:25:30 +00:00
|
|
|
margin-top: 24;
|
|
|
|
margin-bottom: 24;
|
2024-10-20 14:15:22 +00:00
|
|
|
margin-start: 24;
|
|
|
|
margin-end: 24;
|
|
|
|
|
2024-10-20 14:25:30 +00:00
|
|
|
Picture {
|
2024-10-20 14:15:22 +00:00
|
|
|
valign: center;
|
|
|
|
styles [ "frame" ]
|
|
|
|
halign: center;
|
|
|
|
paintable: bind template.playing_cover_art;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
$UiPlayQueue play_queue {
|
|
|
|
hexpand: true;
|
|
|
|
halign: fill;
|
|
|
|
|
|
|
|
margin-top: 48;
|
|
|
|
margin-bottom: 48;
|
|
|
|
margin-start: 24;
|
|
|
|
margin-end: 24;
|
|
|
|
|
|
|
|
styles [ "frame" ]
|
|
|
|
playbin: bind template.playbin;
|
|
|
|
}
|
2024-10-15 11:27:47 +00:00
|
|
|
};
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|
2024-10-20 13:30:22 +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
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|