audrey/src/window.blp
2024-10-14 21:55:24 +02:00

227 lines
4.4 KiB
Text

using Gtk 4.0;
using Adw 1;
template $WaveletWindow: Adw.ApplicationWindow {
title: _("Wavelet");
default-width: 800;
default-height: 600;
content: Box {
orientation: vertical;
Adw.OverlaySplitView {
vexpand: true;
[sidebar]
Adw.NavigationPage {
width-request: 100;
title: _("Wavelet");
Adw.ToolbarView {
[top]
Adw.HeaderBar {}
content: Box {
orientation: vertical;
ListBox sidebar {
styles [
"navigation-sidebar",
]
ListBoxRow sidebar_setup {
Label {
xalign: 0;
label: _("Setup");
}
}
ListBoxRow sidebar_play_queue {
Label {
xalign: 0;
label: _("Play queue");
}
}
}
Separator {}
ListBox {
selection-mode: none;
styles [
"navigation-sidebar",
]
Adw.ButtonRow shuffle_all_tracks {
title: _("Shuffle all tracks");
start-icon-name: "media-playlist-shuffle";
sensitive: false;
}
}
};
}
}
[content]
Stack stack {
StackPage {
name: "setup";
title: _("Setup");
child: $WaveletSetup setup {};
}
StackPage {
name: "artist_list";
title: _("Artists");
child: $WaveletArtistList artist_list {};
}
StackPage {
name: "song_list";
title: _("Songs");
child: $WaveletSongList song_list {};
}
StackPage {
name: "play_queue";
title: _("Play queue");
child: $WaveletPlayQueue play_queue {};
}
}
}
[bottom]
Box {
orientation: horizontal;
styles [
"toolbar",
]
Image {
height-request: 100;
width-request: 100;
}
Box {
orientation: vertical;
valign: center;
Label {
styles [ "caption-heading" ]
halign: start;
label: bind template.song as <$WaveletSong>.title;
}
Box {
halign: start;
Label {
styles [ "caption" ]
label: bind template.song as <$WaveletSong>.artist;
}
Label {
styles [ "caption" ]
label: " - ";
}
Label {
styles [ "caption" ]
label: bind template.song as <$WaveletSong>.album;
}
Label {
styles [ "caption" ]
label: " - ";
}
Label {
styles [ "caption" ]
label: bind template.song as <$WaveletSong>.year;
}
}
Box {
halign: start;
orientation: horizontal;
Label play_position_label {
styles [
"caption",
"numeric",
]
label: "00:00";
}
Scale play_position {
orientation: horizontal;
width-request: 200;
sensitive: false;
adjustment: Adjustment {
lower: 0;
value: bind template.play_position_ms bidirectional;
upper: bind template.play_duration_ms;
};
}
Label play_duration {
styles [
"caption",
"numeric",
]
label: "00:00";
}
}
}
Separator {
styles [
"spacer",
]
hexpand: true;
}
Button {
icon-name: "media-skip-backward";
valign: center;
}
Button {
icon-name: "media-playback-start";
valign: center;
}
Button {
icon-name: "media-skip-forward";
valign: center;
}
Button {
icon-name: "non-starred";
valign: center;
}
Button mute {
icon-name: "audio-volume-high";
valign: center;
}
Scale {
orientation: horizontal;
width-request: 130;
adjustment: Adjustment {
lower: 0.0;
value: bind template.volume bidirectional;
upper: 1.0;
};
}
}
};
}