Compare commits
No commits in common. "af4da894fc719bf60ee78fe0d6fa5c70ce1ff45b" and "2f96d2216d1ed448aa7702bcff3164cec08383e7" have entirely different histories.
af4da894fc
...
2f96d2216d
5 changed files with 21 additions and 59 deletions
|
@ -144,9 +144,5 @@ SizeGroup {
|
||||||
}
|
}
|
||||||
|
|
||||||
menu song-menu {
|
menu song-menu {
|
||||||
item ("View song", "song.view")
|
|
||||||
item ("View artist", "song.view-artist")
|
|
||||||
item ("View album", "song.view-album")
|
|
||||||
item ("Share", "song.share")
|
|
||||||
item ("Remove", "song.remove")
|
item ("Remove", "song.remove")
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,39 +10,29 @@ template $UiPlaybar: Box {
|
||||||
|
|
||||||
[start]
|
[start]
|
||||||
Box {
|
Box {
|
||||||
Picture {
|
orientation: vertical;
|
||||||
visible: bind template.show_cover_art;
|
valign: center;
|
||||||
valign: center;
|
|
||||||
halign: center;
|
Label {
|
||||||
paintable: bind template.playing_cover_art;
|
styles [ "heading" ]
|
||||||
|
xalign: 0;
|
||||||
|
halign: start;
|
||||||
|
label: bind $song_title (template.song) as <string>;
|
||||||
|
ellipsize: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
Box {
|
Label {
|
||||||
margin-start: 6;
|
styles [ "caption" ]
|
||||||
orientation: vertical;
|
xalign: 0;
|
||||||
valign: center;
|
label: bind $song_artist (template.song) as <string>;
|
||||||
|
ellipsize: end;
|
||||||
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
styles [ "heading" ]
|
styles [ "caption" ]
|
||||||
xalign: 0;
|
xalign: 0;
|
||||||
halign: start;
|
label: bind $song_album (template.song) as <string>;
|
||||||
label: bind $song_title (template.song) as <string>;
|
ellipsize: end;
|
||||||
ellipsize: end;
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
styles [ "caption" ]
|
|
||||||
xalign: 0;
|
|
||||||
label: bind $song_artist (template.song) as <string>;
|
|
||||||
ellipsize: end;
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
|
||||||
styles [ "caption" ]
|
|
||||||
xalign: 0;
|
|
||||||
label: bind $song_album (template.song) as <string>;
|
|
||||||
ellipsize: end;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
[GtkTemplate (ui = "/eu/callcc/audrey/ui/playbar.ui")]
|
[GtkTemplate (ui = "/eu/callcc/audrey/ui/playbar.ui")]
|
||||||
class Ui.Playbar : Gtk.Box {
|
class Ui.Playbar : Gtk.Box {
|
||||||
public Subsonic.Song? song { get; set; }
|
public Subsonic.Song? song { get; set; }
|
||||||
public Gdk.Paintable? playing_cover_art { get; set; }
|
|
||||||
public Playbin playbin { get; set; }
|
public Playbin playbin { get; set; }
|
||||||
public bool show_cover_art { get; set; default = true; }
|
|
||||||
|
|
||||||
public int volume {
|
public int volume {
|
||||||
get { return playbin == null ? 100 : playbin.volume; }
|
get { return playbin == null ? 100 : playbin.volume; }
|
||||||
set { playbin.volume = value; }
|
set { playbin.volume = value; }
|
||||||
|
|
|
@ -36,23 +36,8 @@ template $UiWindow: Adw.ApplicationWindow {
|
||||||
|
|
||||||
content: Adw.ViewStack stack {
|
content: Adw.ViewStack stack {
|
||||||
Adw.ViewStackPage {
|
Adw.ViewStackPage {
|
||||||
icon-name: "audio-input-microphone";
|
|
||||||
title: _("Artists");
|
|
||||||
|
|
||||||
child: Box {};
|
|
||||||
}
|
|
||||||
|
|
||||||
Adw.ViewStackPage {
|
|
||||||
icon-name: "media-optical-cd";
|
|
||||||
title: _("Albums");
|
|
||||||
|
|
||||||
child: Box {};
|
|
||||||
}
|
|
||||||
|
|
||||||
Adw.ViewStackPage {
|
|
||||||
icon-name: "media-playback-start";
|
|
||||||
title: _("Play queue");
|
title: _("Play queue");
|
||||||
name: "play-queue";
|
icon-name: "media-playback-start";
|
||||||
|
|
||||||
child: Box {
|
child: Box {
|
||||||
name: "play-queue-page";
|
name: "play-queue-page";
|
||||||
|
@ -94,8 +79,6 @@ template $UiWindow: Adw.ApplicationWindow {
|
||||||
$UiPlaybar playbar {
|
$UiPlaybar playbar {
|
||||||
song: bind template.song;
|
song: bind template.song;
|
||||||
playbin: bind template.playbin;
|
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>;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,8 +111,4 @@ class Ui.Window : Adw.ApplicationWindow {
|
||||||
this.playbin.select_track (0);
|
this.playbin.select_track (0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
[GtkCallback] private bool show_playbar_cover_art (string? stack_child) {
|
|
||||||
return stack_child != "play-queue";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue