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-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-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
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|