audrey/resources/window.blp

137 lines
3.1 KiB
Text
Raw Normal View History

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-20 16:25:40 +00:00
Adw.ToolbarView {
top-bar-style: raised;
bottom-bar-style: raised;
[top]
Adw.HeaderBar {
[start]
Button {
icon-name: "media-playlist-shuffle";
sensitive: bind template.can_click_shuffle_all;
clicked => $shuffle_all ();
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";
clicked => $show_setup_dialog ();
}
}
2024-10-20 15:43:06 +00:00
2024-10-20 16:25:40 +00:00
content: Adw.ViewStack stack {
vexpand: true;
Adw.ViewStackPage {
icon-name: "media-optical-cd";
title: _("Albums");
child: Adw.NavigationView {
Adw.NavigationPage {
title: _("Albums");
vexpand: true;
child: Adw.ToolbarView {
[top]
CenterBox {
styles [ "toolbar" ]
2024-10-28 08:47:27 +00:00
[start]
DropDown {
selected: 0;
model: StringList {
strings [
_("Random"),
_("Recently added"),
_("Most played"),
_("Recently played"),
_("Starred"),
_("Name"),
_("Artist"),
]
};
}
2024-10-20 16:25:40 +00:00
[center]
SearchEntry {
placeholder-text: _("Search...");
}
2024-10-20 15:43:06 +00:00
2024-10-20 16:25:40 +00:00
[end]
Box {
Button {
icon-name: "view-refresh";
2024-10-20 15:43:06 +00:00
}
}
2024-10-20 16:25:40 +00:00
}
2024-10-20 15:43:06 +00:00
2024-10-20 16:25:40 +00:00
ScrolledWindow {
vexpand: true;
2024-10-20 15:43:06 +00:00
GridView {}
2024-10-20 16:25:40 +00:00
}
};
}
};
}
Adw.ViewStackPage {
icon-name: "media-playback-start";
title: _("Play queue");
name: "play-queue";
2024-10-20 16:25:40 +00:00
child: Box {
name: "play-queue-page";
homogeneous: true;
2024-10-10 10:12:43 +00:00
2024-10-20 16:25:40 +00:00
Adw.Clamp {
halign: center;
margin-top: 24;
margin-bottom: 24;
margin-start: 24;
margin-end: 24;
2024-10-20 14:15:22 +00:00
2024-10-20 16:25:40 +00:00
Picture {
valign: center;
styles [ "frame" ]
2024-10-20 14:15:22 +00:00
halign: center;
2024-10-20 16:25:40 +00:00
paintable: bind template.playing_cover_art;
2024-10-20 14:15:22 +00:00
}
2024-10-20 16:25:40 +00:00
}
2024-10-20 14:15:22 +00:00
2024-10-20 16:25:40 +00:00
$UiPlayQueue play_queue {
hexpand: true;
halign: fill;
2024-10-20 14:15:22 +00:00
2024-10-20 16:25:40 +00:00
margin-top: 48;
margin-bottom: 48;
margin-start: 24;
margin-end: 24;
2024-10-20 14:15:22 +00:00
2024-10-20 16:25:40 +00:00
styles [ "frame" ]
playbin: bind template.playbin;
}
};
}
};
2024-10-10 10:12:43 +00:00
2024-10-20 16:25:40 +00:00
[bottom]
2024-10-19 15:04:56 +00:00
$UiPlaybar playbar {
song: bind template.song;
playbin: bind template.playbin;
playing_cover_art: bind template.playing_cover_art;
show_cover_art: bind $show_playbar_cover_art (stack.visible-child-name) as <bool>;
2024-10-10 10:12:43 +00:00
}
2024-10-20 16:25:40 +00:00
}
2024-10-10 10:12:43 +00:00
}