blueprint-compiler format
This commit is contained in:
parent
630b44b352
commit
f016778f5e
5 changed files with 109 additions and 75 deletions
|
@ -27,7 +27,6 @@ template $AudreyUiPlayQueue: Adw.Bin {
|
||||||
ListView view {
|
ListView view {
|
||||||
show-separators: true;
|
show-separators: true;
|
||||||
single-click-activate: true;
|
single-click-activate: true;
|
||||||
|
|
||||||
activate => $on_row_activated() swapped;
|
activate => $on_row_activated() swapped;
|
||||||
|
|
||||||
model: NoSelection {
|
model: NoSelection {
|
||||||
|
|
|
@ -24,7 +24,11 @@ template $AudreyUiPlayQueueSong: Box {
|
||||||
focusable: false;
|
focusable: false;
|
||||||
halign: end;
|
halign: end;
|
||||||
justify: right;
|
justify: right;
|
||||||
styles [ "dim-label", "numeric" ]
|
|
||||||
|
styles [
|
||||||
|
"dim-label",
|
||||||
|
"numeric"
|
||||||
|
]
|
||||||
|
|
||||||
label: bind template.displayed_position;
|
label: bind template.displayed_position;
|
||||||
}
|
}
|
||||||
|
@ -39,17 +43,26 @@ template $AudreyUiPlayQueueSong: Box {
|
||||||
}
|
}
|
||||||
|
|
||||||
Box title_box {
|
Box title_box {
|
||||||
styles [ "header"]
|
styles [
|
||||||
|
"header"
|
||||||
|
]
|
||||||
|
|
||||||
focusable: false;
|
focusable: false;
|
||||||
hexpand: true;
|
hexpand: true;
|
||||||
valign: center;
|
valign: center;
|
||||||
|
|
||||||
Box {
|
Box {
|
||||||
styles [ "title" ]
|
styles [
|
||||||
|
"title"
|
||||||
|
]
|
||||||
|
|
||||||
orientation: vertical;
|
orientation: vertical;
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
styles [ "title" ]
|
styles [
|
||||||
|
"title"
|
||||||
|
]
|
||||||
|
|
||||||
focusable: false;
|
focusable: false;
|
||||||
xalign: 0;
|
xalign: 0;
|
||||||
halign: start;
|
halign: start;
|
||||||
|
@ -57,12 +70,14 @@ template $AudreyUiPlayQueueSong: Box {
|
||||||
ellipsize: end;
|
ellipsize: end;
|
||||||
max-width-chars: 90;
|
max-width-chars: 90;
|
||||||
justify: fill;
|
justify: fill;
|
||||||
|
|
||||||
label: bind template.song as <$AudreyPlaybinSong>.title;
|
label: bind template.song as <$AudreyPlaybinSong>.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
styles [ "subtitle" ]
|
styles [
|
||||||
|
"subtitle"
|
||||||
|
]
|
||||||
|
|
||||||
focusable: false;
|
focusable: false;
|
||||||
xalign: 0;
|
xalign: 0;
|
||||||
halign: start;
|
halign: start;
|
||||||
|
@ -70,7 +85,6 @@ template $AudreyUiPlayQueueSong: Box {
|
||||||
ellipsize: end;
|
ellipsize: end;
|
||||||
max-width-chars: 90;
|
max-width-chars: 90;
|
||||||
justify: fill;
|
justify: fill;
|
||||||
|
|
||||||
label: bind template.song as <$AudreyPlaybinSong>.artist;
|
label: bind template.song as <$AudreyPlaybinSong>.artist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,7 +95,11 @@ template $AudreyUiPlayQueueSong: Box {
|
||||||
halign: end;
|
halign: end;
|
||||||
hexpand: true;
|
hexpand: true;
|
||||||
single-line-mode: true;
|
single-line-mode: true;
|
||||||
styles [ "numeric", "dim-label" ]
|
|
||||||
|
styles [
|
||||||
|
"numeric",
|
||||||
|
"dim-label"
|
||||||
|
]
|
||||||
|
|
||||||
label: bind $format_duration(template.song as <$AudreyPlaybinSong>.duration) as <string>;
|
label: bind $format_duration(template.song as <$AudreyPlaybinSong>.duration) as <string>;
|
||||||
}
|
}
|
||||||
|
@ -90,7 +108,11 @@ template $AudreyUiPlayQueueSong: Box {
|
||||||
focusable: true;
|
focusable: true;
|
||||||
// TODO icon-name: bind $star_button_icon_name (template.song as <$AudreyPlaybinSong>.starred) as <string>;
|
// TODO icon-name: bind $star_button_icon_name (template.song as <$AudreyPlaybinSong>.starred) as <string>;
|
||||||
icon-name: bind $star_button_icon_name() as <string>;
|
icon-name: bind $star_button_icon_name() as <string>;
|
||||||
styles [ "flat" ]
|
|
||||||
|
styles [
|
||||||
|
"flat"
|
||||||
|
]
|
||||||
|
|
||||||
valign: center;
|
valign: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +120,11 @@ template $AudreyUiPlayQueueSong: Box {
|
||||||
// visible: false;
|
// visible: false;
|
||||||
focusable: true;
|
focusable: true;
|
||||||
icon-name: "view-more";
|
icon-name: "view-more";
|
||||||
styles [ "flat" ]
|
|
||||||
|
styles [
|
||||||
|
"flat"
|
||||||
|
]
|
||||||
|
|
||||||
valign: center;
|
valign: center;
|
||||||
|
|
||||||
popover: PopoverMenu {
|
popover: PopoverMenu {
|
||||||
|
@ -109,7 +135,6 @@ template $AudreyUiPlayQueueSong: Box {
|
||||||
DragSource {
|
DragSource {
|
||||||
actions: move;
|
actions: move;
|
||||||
propagation-phase: capture;
|
propagation-phase: capture;
|
||||||
|
|
||||||
prepare => $on_drag_prepare() swapped;
|
prepare => $on_drag_prepare() swapped;
|
||||||
drag-begin => $on_drag_begin() swapped;
|
drag-begin => $on_drag_begin() swapped;
|
||||||
}
|
}
|
||||||
|
@ -118,7 +143,6 @@ template $AudreyUiPlayQueueSong: Box {
|
||||||
actions: move;
|
actions: move;
|
||||||
formats: "AudreyUiPlayQueueSong";
|
formats: "AudreyUiPlayQueueSong";
|
||||||
preload: true;
|
preload: true;
|
||||||
|
|
||||||
drop => $on_drop() swapped;
|
drop => $on_drop() swapped;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ using Adw 1;
|
||||||
template $AudreyUiPlaybar: Adw.Bin {
|
template $AudreyUiPlaybar: Adw.Bin {
|
||||||
child: CenterBox {
|
child: CenterBox {
|
||||||
hexpand: true;
|
hexpand: true;
|
||||||
|
|
||||||
styles [
|
styles [
|
||||||
"toolbar",
|
"toolbar",
|
||||||
]
|
]
|
||||||
|
@ -13,7 +14,6 @@ template $AudreyUiPlaybar: Adw.Bin {
|
||||||
AspectFrame {
|
AspectFrame {
|
||||||
visible: false; // FIXME annoying annoying annoying annoying
|
visible: false; // FIXME annoying annoying annoying annoying
|
||||||
// visible: bind template.show_cover_art;
|
// visible: bind template.show_cover_art;
|
||||||
|
|
||||||
vexpand: true;
|
vexpand: true;
|
||||||
ratio: 1.0;
|
ratio: 1.0;
|
||||||
obey-child: false;
|
obey-child: false;
|
||||||
|
@ -30,7 +30,10 @@ template $AudreyUiPlaybar: Adw.Bin {
|
||||||
valign: center;
|
valign: center;
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
styles [ "heading" ]
|
styles [
|
||||||
|
"heading"
|
||||||
|
]
|
||||||
|
|
||||||
xalign: 0;
|
xalign: 0;
|
||||||
halign: start;
|
halign: start;
|
||||||
label: bind $song_title(template.song) as <string>;
|
label: bind $song_title(template.song) as <string>;
|
||||||
|
@ -38,14 +41,20 @@ template $AudreyUiPlaybar: Adw.Bin {
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
styles [ "caption" ]
|
styles [
|
||||||
|
"caption"
|
||||||
|
]
|
||||||
|
|
||||||
xalign: 0;
|
xalign: 0;
|
||||||
label: bind $song_artist(template.song) as <string>;
|
label: bind $song_artist(template.song) as <string>;
|
||||||
ellipsize: end;
|
ellipsize: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
styles [ "caption" ]
|
styles [
|
||||||
|
"caption"
|
||||||
|
]
|
||||||
|
|
||||||
xalign: 0;
|
xalign: 0;
|
||||||
label: bind $song_album(template.song) as <string>;
|
label: bind $song_album(template.song) as <string>;
|
||||||
ellipsize: end;
|
ellipsize: end;
|
||||||
|
@ -75,7 +84,6 @@ template $AudreyUiPlaybar: Adw.Bin {
|
||||||
orientation: horizontal;
|
orientation: horizontal;
|
||||||
width-request: 400;
|
width-request: 400;
|
||||||
// sensitive: bind $playbin_active (template.playbin as <$AudreyPlaybin>.state as <$AudreyPlaybinState>) as <bool>;
|
// sensitive: bind $playbin_active (template.playbin as <$AudreyPlaybin>.state as <$AudreyPlaybinState>) as <bool>;
|
||||||
|
|
||||||
adjustment: Adjustment {
|
adjustment: Adjustment {
|
||||||
lower: 0;
|
lower: 0;
|
||||||
value: bind template.position;
|
value: bind template.position;
|
||||||
|
@ -104,7 +112,6 @@ template $AudreyUiPlaybar: Adw.Bin {
|
||||||
icon-name: "media-skip-backward";
|
icon-name: "media-skip-backward";
|
||||||
valign: center;
|
valign: center;
|
||||||
// sensitive: bind $playbin_active (template.playbin as <$AudreyPlaybin>.state as <$AudreyPlaybinState>) as <bool>;
|
// sensitive: bind $playbin_active (template.playbin as <$AudreyPlaybin>.state as <$AudreyPlaybinState>) as <bool>;
|
||||||
|
|
||||||
clicked => $on_skip_backward_clicked() swapped;
|
clicked => $on_skip_backward_clicked() swapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +119,6 @@ template $AudreyUiPlaybar: Adw.Bin {
|
||||||
icon-name: "media-seek-backward";
|
icon-name: "media-seek-backward";
|
||||||
valign: center;
|
valign: center;
|
||||||
// sensitive: bind $playbin_active (template.playbin as <$AudreyPlaybin>.state as <$AudreyPlaybinState>) as <bool>;
|
// sensitive: bind $playbin_active (template.playbin as <$AudreyPlaybin>.state as <$AudreyPlaybinState>) as <bool>;
|
||||||
|
|
||||||
clicked => $seek_backward() swapped;
|
clicked => $seek_backward() swapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +126,6 @@ template $AudreyUiPlaybar: Adw.Bin {
|
||||||
icon-name: bind $play_pause_icon_name(template.idle-active, template.pause) as <string>;
|
icon-name: bind $play_pause_icon_name(template.idle-active, template.pause) as <string>;
|
||||||
valign: center;
|
valign: center;
|
||||||
// sensitive: bind $can_press_play (template.playbin as <$AudreyPlaybin>.state as <$AudreyPlaybinState>, template.playbin as <$AudreyPlaybin>.play-queue-length) as <bool>;
|
// sensitive: bind $can_press_play (template.playbin as <$AudreyPlaybin>.state as <$AudreyPlaybinState>, template.playbin as <$AudreyPlaybin>.play-queue-length) as <bool>;
|
||||||
|
|
||||||
clicked => $on_play_pause_clicked() swapped;
|
clicked => $on_play_pause_clicked() swapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +133,6 @@ template $AudreyUiPlaybar: Adw.Bin {
|
||||||
icon-name: "media-seek-forward";
|
icon-name: "media-seek-forward";
|
||||||
valign: center;
|
valign: center;
|
||||||
// sensitive: bind $playbin_active (template.playbin as <$AudreyPlaybin>.state as <$AudreyPlaybinState>) as <bool>;
|
// sensitive: bind $playbin_active (template.playbin as <$AudreyPlaybin>.state as <$AudreyPlaybinState>) as <bool>;
|
||||||
|
|
||||||
clicked => $seek_forward() swapped;
|
clicked => $seek_forward() swapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +140,6 @@ template $AudreyUiPlaybar: Adw.Bin {
|
||||||
icon-name: "media-skip-forward";
|
icon-name: "media-skip-forward";
|
||||||
valign: center;
|
valign: center;
|
||||||
// sensitive: bind $playbin_active (template.playbin as <$AudreyPlaybin>.state as <$AudreyPlaybinState>) as <bool>;
|
// sensitive: bind $playbin_active (template.playbin as <$AudreyPlaybin>.state as <$AudreyPlaybinState>) as <bool>;
|
||||||
|
|
||||||
clicked => $on_skip_forward_clicked() swapped;
|
clicked => $on_skip_forward_clicked() swapped;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -152,7 +155,6 @@ template $AudreyUiPlaybar: Adw.Bin {
|
||||||
Button {
|
Button {
|
||||||
icon-name: bind $mute_button_icon_name(template.mute) as <string>;
|
icon-name: bind $mute_button_icon_name(template.mute) as <string>;
|
||||||
valign: center;
|
valign: center;
|
||||||
|
|
||||||
clicked => $on_mute_toggle() swapped;
|
clicked => $on_mute_toggle() swapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,10 @@ template $AudreyUiSetup: Adw.PreferencesDialog {
|
||||||
|
|
||||||
[header-suffix]
|
[header-suffix]
|
||||||
Gtk.Button {
|
Gtk.Button {
|
||||||
styles [ "flat" ]
|
styles [
|
||||||
|
"flat"
|
||||||
|
]
|
||||||
|
|
||||||
icon-name: "edit-undo";
|
icon-name: "edit-undo";
|
||||||
sensitive: bind template.authn_can_validate;
|
sensitive: bind template.authn_can_validate;
|
||||||
}
|
}
|
||||||
|
@ -24,7 +27,6 @@ template $AudreyUiSetup: Adw.PreferencesDialog {
|
||||||
input-purpose: url;
|
input-purpose: url;
|
||||||
sensitive: bind template.authn_can_edit;
|
sensitive: bind template.authn_can_edit;
|
||||||
text: bind template.server_url bidirectional;
|
text: bind template.server_url bidirectional;
|
||||||
|
|
||||||
changed => $on_authn_changed() swapped;
|
changed => $on_authn_changed() swapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +34,6 @@ template $AudreyUiSetup: Adw.PreferencesDialog {
|
||||||
title: _("Username");
|
title: _("Username");
|
||||||
sensitive: bind template.authn_can_edit;
|
sensitive: bind template.authn_can_edit;
|
||||||
text: bind template.username bidirectional;
|
text: bind template.username bidirectional;
|
||||||
|
|
||||||
changed => $on_authn_changed() swapped;
|
changed => $on_authn_changed() swapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +41,6 @@ template $AudreyUiSetup: Adw.PreferencesDialog {
|
||||||
title: _("Password");
|
title: _("Password");
|
||||||
sensitive: bind template.authn_can_edit;
|
sensitive: bind template.authn_can_edit;
|
||||||
text: bind template.password bidirectional;
|
text: bind template.password bidirectional;
|
||||||
|
|
||||||
changed => $on_authn_changed() swapped;
|
changed => $on_authn_changed() swapped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,6 @@ template $AudreyUiSetup: Adw.PreferencesDialog {
|
||||||
Adw.ButtonRow {
|
Adw.ButtonRow {
|
||||||
title: _("Connect and save");
|
title: _("Connect and save");
|
||||||
sensitive: bind template.authn_can_validate;
|
sensitive: bind template.authn_can_validate;
|
||||||
|
|
||||||
activated => $on_authn_validate_activated() swapped;
|
activated => $on_authn_validate_activated() swapped;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ template $AudreyUiWindow: Adw.ApplicationWindow {
|
||||||
|
|
||||||
content: Adw.ViewStack stack {
|
content: Adw.ViewStack stack {
|
||||||
vexpand: true;
|
vexpand: true;
|
||||||
|
|
||||||
Adw.ViewStackPage {
|
Adw.ViewStackPage {
|
||||||
icon-name: "media-optical-cd";
|
icon-name: "media-optical-cd";
|
||||||
title: _("Albums");
|
title: _("Albums");
|
||||||
|
@ -45,11 +46,14 @@ template $AudreyUiWindow: Adw.ApplicationWindow {
|
||||||
child: Adw.ToolbarView {
|
child: Adw.ToolbarView {
|
||||||
[top]
|
[top]
|
||||||
CenterBox {
|
CenterBox {
|
||||||
styles [ "toolbar" ]
|
styles [
|
||||||
|
"toolbar"
|
||||||
|
]
|
||||||
|
|
||||||
[start]
|
[start]
|
||||||
DropDown {
|
DropDown {
|
||||||
selected: 0;
|
selected: 0;
|
||||||
|
|
||||||
model: StringList {
|
model: StringList {
|
||||||
strings [
|
strings [
|
||||||
_("Random"),
|
_("Random"),
|
||||||
|
@ -78,6 +82,7 @@ template $AudreyUiWindow: Adw.ApplicationWindow {
|
||||||
|
|
||||||
ScrolledWindow {
|
ScrolledWindow {
|
||||||
vexpand: true;
|
vexpand: true;
|
||||||
|
|
||||||
GridView {}
|
GridView {}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -103,7 +108,11 @@ template $AudreyUiWindow: Adw.ApplicationWindow {
|
||||||
|
|
||||||
Picture {
|
Picture {
|
||||||
valign: center;
|
valign: center;
|
||||||
styles [ "frame" ]
|
|
||||||
|
styles [
|
||||||
|
"frame"
|
||||||
|
]
|
||||||
|
|
||||||
halign: center;
|
halign: center;
|
||||||
paintable: bind template.playing_cover_art;
|
paintable: bind template.playing_cover_art;
|
||||||
}
|
}
|
||||||
|
@ -112,13 +121,15 @@ template $AudreyUiWindow: Adw.ApplicationWindow {
|
||||||
$AudreyUiPlayQueue play_queue {
|
$AudreyUiPlayQueue play_queue {
|
||||||
hexpand: true;
|
hexpand: true;
|
||||||
halign: fill;
|
halign: fill;
|
||||||
|
|
||||||
margin-top: 48;
|
margin-top: 48;
|
||||||
margin-bottom: 48;
|
margin-bottom: 48;
|
||||||
margin-start: 24;
|
margin-start: 24;
|
||||||
margin-end: 24;
|
margin-end: 24;
|
||||||
|
|
||||||
styles [ "frame" ]
|
styles [
|
||||||
|
"frame"
|
||||||
|
]
|
||||||
|
|
||||||
model: bind template.playlist_model;
|
model: bind template.playlist_model;
|
||||||
playlist-pos: bind template.playlist-pos;
|
playlist-pos: bind template.playlist-pos;
|
||||||
// playbin: bind template.playbin;
|
// playbin: bind template.playbin;
|
||||||
|
@ -132,7 +143,6 @@ template $AudreyUiWindow: Adw.ApplicationWindow {
|
||||||
song: bind template.song;
|
song: bind template.song;
|
||||||
playing_cover_art: bind template.playing_cover_art;
|
playing_cover_art: bind template.playing_cover_art;
|
||||||
show_cover_art: bind $show_playbar_cover_art(stack.visible-child-name) as <bool>;
|
show_cover_art: bind $show_playbar_cover_art(stack.visible-child-name) as <bool>;
|
||||||
|
|
||||||
volume: bind template.volume bidirectional;
|
volume: bind template.volume bidirectional;
|
||||||
mute: bind template.mute bidirectional;
|
mute: bind template.mute bidirectional;
|
||||||
pause: bind template.pause bidirectional;
|
pause: bind template.pause bidirectional;
|
||||||
|
|
Loading…
Reference in a new issue