baahhhhh
This commit is contained in:
parent
48795a4d2f
commit
fdd719f4f8
2 changed files with 112 additions and 105 deletions
|
@ -10,11 +10,18 @@ template $UiPlaybar: Box {
|
|||
|
||||
[start]
|
||||
Box {
|
||||
Picture {
|
||||
visible: bind template.show_cover_art;
|
||||
valign: center;
|
||||
halign: center;
|
||||
paintable: bind template.playing_cover_art;
|
||||
AspectFrame {
|
||||
visible: false; // FIXME annoying annoying annoying annoying
|
||||
//visible: bind template.show_cover_art;
|
||||
|
||||
vexpand: true;
|
||||
ratio: 1.0;
|
||||
obey-child: false;
|
||||
|
||||
child: Picture {
|
||||
content-fit: scale_down;
|
||||
paintable: bind template.playing_cover_art;
|
||||
};
|
||||
}
|
||||
|
||||
Box {
|
||||
|
@ -49,8 +56,7 @@ template $UiPlaybar: Box {
|
|||
[center]
|
||||
Box {
|
||||
orientation: vertical;
|
||||
halign: center;
|
||||
hexpand: true;
|
||||
valign: center;
|
||||
|
||||
CenterBox {
|
||||
[start]
|
||||
|
|
|
@ -6,114 +6,115 @@ template $UiWindow: Adw.ApplicationWindow {
|
|||
default-width: 800;
|
||||
default-height: 600;
|
||||
|
||||
content: Adw.BottomSheet bottom_sheet {
|
||||
can-open: false; // broken in libadwaita
|
||||
Adw.ToolbarView {
|
||||
top-bar-style: raised;
|
||||
bottom-bar-style: raised;
|
||||
|
||||
[content]
|
||||
Adw.ToolbarView {
|
||||
margin-bottom: bind bottom_sheet.bottom-bar-height;
|
||||
|
||||
[top]
|
||||
Adw.HeaderBar {
|
||||
[start]
|
||||
Button {
|
||||
icon-name: "media-playlist-shuffle";
|
||||
sensitive: bind template.can_click_shuffle_all;
|
||||
clicked => $shuffle_all ();
|
||||
}
|
||||
|
||||
title-widget: Adw.ViewSwitcher {
|
||||
stack: stack;
|
||||
policy: wide;
|
||||
};
|
||||
|
||||
[end]
|
||||
Button {
|
||||
icon-name: "applications-system";
|
||||
clicked => $show_setup_dialog ();
|
||||
}
|
||||
[top]
|
||||
Adw.HeaderBar {
|
||||
[start]
|
||||
Button {
|
||||
icon-name: "media-playlist-shuffle";
|
||||
sensitive: bind template.can_click_shuffle_all;
|
||||
clicked => $shuffle_all ();
|
||||
}
|
||||
|
||||
content: Adw.ViewStack stack {
|
||||
Adw.ViewStackPage {
|
||||
icon-name: "media-optical-cd";
|
||||
title: _("Albums");
|
||||
|
||||
child: Adw.NavigationView {
|
||||
Adw.NavigationPage {
|
||||
title: _("Albums");
|
||||
|
||||
child: Adw.ToolbarView {
|
||||
[top]
|
||||
CenterBox {
|
||||
styles [ "toolbar" ]
|
||||
|
||||
[center]
|
||||
SearchEntry {
|
||||
placeholder-text: _("Search...");
|
||||
}
|
||||
|
||||
[end]
|
||||
Box {
|
||||
Button {
|
||||
icon-name: "view-refresh";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GridView {}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Adw.ViewStackPage {
|
||||
icon-name: "media-playback-start";
|
||||
title: _("Play queue");
|
||||
name: "play-queue";
|
||||
|
||||
child: Box {
|
||||
name: "play-queue-page";
|
||||
homogeneous: true;
|
||||
|
||||
Adw.Clamp {
|
||||
halign: center;
|
||||
margin-top: 24;
|
||||
margin-bottom: 24;
|
||||
margin-start: 24;
|
||||
margin-end: 24;
|
||||
|
||||
Picture {
|
||||
valign: center;
|
||||
styles [ "frame" ]
|
||||
halign: center;
|
||||
paintable: bind template.playing_cover_art;
|
||||
}
|
||||
}
|
||||
|
||||
$UiPlayQueue play_queue {
|
||||
hexpand: true;
|
||||
halign: fill;
|
||||
|
||||
margin-top: 48;
|
||||
margin-bottom: 48;
|
||||
margin-start: 24;
|
||||
margin-end: 24;
|
||||
|
||||
styles [ "frame" ]
|
||||
playbin: bind template.playbin;
|
||||
}
|
||||
};
|
||||
}
|
||||
title-widget: Adw.ViewSwitcher {
|
||||
stack: stack;
|
||||
policy: wide;
|
||||
};
|
||||
|
||||
[end]
|
||||
Button {
|
||||
icon-name: "applications-system";
|
||||
clicked => $show_setup_dialog ();
|
||||
}
|
||||
}
|
||||
|
||||
[bottom-bar]
|
||||
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" ]
|
||||
|
||||
[center]
|
||||
SearchEntry {
|
||||
placeholder-text: _("Search...");
|
||||
}
|
||||
|
||||
[end]
|
||||
Box {
|
||||
Button {
|
||||
icon-name: "view-refresh";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ScrolledWindow {
|
||||
vexpand: true;
|
||||
GridView {}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Adw.ViewStackPage {
|
||||
icon-name: "media-playback-start";
|
||||
title: _("Play queue");
|
||||
name: "play-queue";
|
||||
|
||||
child: Box {
|
||||
name: "play-queue-page";
|
||||
homogeneous: true;
|
||||
|
||||
Adw.Clamp {
|
||||
halign: center;
|
||||
margin-top: 24;
|
||||
margin-bottom: 24;
|
||||
margin-start: 24;
|
||||
margin-end: 24;
|
||||
|
||||
Picture {
|
||||
valign: center;
|
||||
styles [ "frame" ]
|
||||
halign: center;
|
||||
paintable: bind template.playing_cover_art;
|
||||
}
|
||||
}
|
||||
|
||||
$UiPlayQueue play_queue {
|
||||
hexpand: true;
|
||||
halign: fill;
|
||||
|
||||
margin-top: 48;
|
||||
margin-bottom: 48;
|
||||
margin-start: 24;
|
||||
margin-end: 24;
|
||||
|
||||
styles [ "frame" ]
|
||||
playbin: bind template.playbin;
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
[bottom]
|
||||
$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>;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue