2024-10-10 10:12:43 +00:00
|
|
|
using Gtk 4.0;
|
|
|
|
using Adw 1;
|
|
|
|
|
2024-10-29 14:46:33 +00:00
|
|
|
template $AudreyUiWindow: 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-20 16:25:40 +00:00
|
|
|
Adw.ToolbarView {
|
2024-11-16 08:34:32 +00:00
|
|
|
name: "main";
|
|
|
|
|
2024-10-20 16:25:40 +00:00
|
|
|
[top]
|
|
|
|
Adw.HeaderBar {
|
|
|
|
[start]
|
|
|
|
Button {
|
|
|
|
icon-name: "media-playlist-shuffle";
|
|
|
|
sensitive: bind template.can_click_shuffle_all;
|
2024-11-05 08:29:08 +00:00
|
|
|
clicked => $shuffle_all() swapped;
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|
|
|
|
|
2024-10-20 16:25:40 +00:00
|
|
|
title-widget: Adw.ViewSwitcher {
|
|
|
|
stack: stack;
|
|
|
|
policy: wide;
|
|
|
|
};
|
2024-10-20 15:43:06 +00:00
|
|
|
|
2024-10-20 16:25:40 +00:00
|
|
|
[end]
|
|
|
|
Button {
|
|
|
|
icon-name: "applications-system";
|
2024-11-05 08:29:08 +00:00
|
|
|
clicked => $show_setup_dialog() swapped;
|
2024-10-20 16:25:40 +00:00
|
|
|
}
|
|
|
|
}
|
2024-10-20 15:43:06 +00:00
|
|
|
|
2024-10-20 16:25:40 +00:00
|
|
|
content: Adw.ViewStack stack {
|
|
|
|
vexpand: true;
|
2024-11-05 08:29:08 +00:00
|
|
|
|
2024-10-20 16:25:40 +00:00
|
|
|
Adw.ViewStackPage {
|
2024-11-12 09:51:55 +00:00
|
|
|
icon-name: "folder-music-symbolic";
|
|
|
|
title: _("Browse");
|
2024-10-20 16:25:40 +00:00
|
|
|
|
2024-11-17 10:26:40 +00:00
|
|
|
child: ScrolledWindow {
|
|
|
|
child: Box {
|
|
|
|
orientation: vertical;
|
|
|
|
|
|
|
|
$AudreyUiAlbumCarousel {
|
|
|
|
title: _("Explore from your library");
|
2024-11-17 11:28:02 +00:00
|
|
|
type: random;
|
2024-11-17 10:26:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$AudreyUiAlbumCarousel {
|
|
|
|
title: _("Newly added releases");
|
2024-11-17 11:28:02 +00:00
|
|
|
type: newest;
|
2024-11-17 10:26:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$AudreyUiAlbumCarousel {
|
|
|
|
title: _("Recently played");
|
2024-11-17 11:28:02 +00:00
|
|
|
type: recent;
|
2024-11-17 10:26:40 +00:00
|
|
|
}
|
2024-11-18 21:02:11 +00:00
|
|
|
|
|
|
|
$AudreyUiAlbumCarousel {
|
|
|
|
title: _("Most played");
|
|
|
|
type: frequent;
|
|
|
|
}
|
2024-11-17 10:26:40 +00:00
|
|
|
};
|
2024-10-20 16:25:40 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
Adw.ViewStackPage {
|
|
|
|
icon-name: "media-playback-start";
|
|
|
|
title: _("Play queue");
|
|
|
|
name: "play-queue";
|
2024-10-20 15:28:47 +00:00
|
|
|
|
2024-11-13 17:49:08 +00:00
|
|
|
child: $AudreyUiPlayQueue play_queue {
|
|
|
|
model: bind template.playlist_model;
|
|
|
|
playlist-pos: bind template.playlist-pos;
|
|
|
|
// playbin: bind template.playbin;
|
|
|
|
playing-cover-art: bind template.playing-cover-art;
|
2024-10-20 16:25:40 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
2024-10-10 10:12:43 +00:00
|
|
|
|
2024-10-20 16:25:40 +00:00
|
|
|
[bottom]
|
2024-10-29 14:46:33 +00:00
|
|
|
$AudreyUiPlaybar playbar {
|
2024-10-19 15:04:56 +00:00
|
|
|
song: bind template.song;
|
2024-11-05 09:01:07 +00:00
|
|
|
playing-cover-art: bind template.playing-cover-art;
|
|
|
|
show-cover-art: bind $show_playbar_cover_art(stack.visible-child-name) as <bool>;
|
2024-11-04 11:31:43 +00:00
|
|
|
volume: bind template.volume bidirectional;
|
|
|
|
mute: bind template.mute bidirectional;
|
|
|
|
pause: bind template.pause bidirectional;
|
2024-11-04 12:22:25 +00:00
|
|
|
position: bind template.time-pos;
|
2024-11-05 09:01:07 +00:00
|
|
|
duration: bind template.duration;
|
2024-11-04 12:43:30 +00:00
|
|
|
idle-active: bind template.idle-active;
|
2024-11-05 09:01:07 +00:00
|
|
|
playlist-count: bind template.playlist-count;
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|
2024-10-20 16:25:40 +00:00
|
|
|
}
|
2024-10-10 10:12:43 +00:00
|
|
|
}
|