audrey/resources/window.blp

136 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-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 {
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;
2024-11-02 11:24:25 +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-02 11:24:25 +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;
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-29 14:46:33 +00:00
$AudreyUiPlayQueue play_queue {
2024-10-20 16:25:40 +00:00
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" ]
2024-11-03 17:45:52 +00:00
//playbin: bind template.playbin;
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;
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
}