use adw box for more things

This commit is contained in:
Erica Z 2024-10-28 09:52:50 +01:00
parent edaf7079ac
commit 713b3d8842
4 changed files with 12 additions and 12 deletions

View file

@ -2,10 +2,10 @@ using Gtk 4.0;
using Adw 1; using Adw 1;
using Gio 2.0; using Gio 2.0;
template $UiPlayQueue: Box { template $UiPlayQueue: Adw.Bin {
name: "play-queue"; name: "play-queue";
Stack { child: Stack {
visible-child-name: bind $visible_child_name (template.playbin as <$Playbin>.play_queue as <Gio.ListStore>.n-items) as <string>; visible-child-name: bind $visible_child_name (template.playbin as <$Playbin>.play_queue as <Gio.ListStore>.n-items) as <string>;
StackPage { StackPage {
@ -43,5 +43,5 @@ template $UiPlayQueue: Box {
} }
}; };
} }
} };
} }

View file

@ -112,7 +112,7 @@ class Ui.PlayQueueSong : Gtk.Box {
} }
[GtkTemplate (ui = "/eu/callcc/audrey/ui/play_queue.ui")] [GtkTemplate (ui = "/eu/callcc/audrey/ui/play_queue.ui")]
public class Ui.PlayQueue : Gtk.Box { public class Ui.PlayQueue : Adw.Bin {
private weak Playbin _playbin; private weak Playbin _playbin;
public Playbin playbin { public Playbin playbin {
get { return _playbin; } get { return _playbin; }

View file

@ -1,12 +1,12 @@
using Gtk 4.0; using Gtk 4.0;
using Adw 1;
template $UiPlaybar: Box { template $UiPlaybar: Adw.Bin {
styles [ child: CenterBox {
"toolbar",
]
CenterBox {
hexpand: true; hexpand: true;
styles [
"toolbar",
]
[start] [start]
Box { Box {
@ -168,5 +168,5 @@ template $UiPlaybar: Box {
}; };
} }
} }
} };
} }

View file

@ -1,5 +1,5 @@
[GtkTemplate (ui = "/eu/callcc/audrey/ui/playbar.ui")] [GtkTemplate (ui = "/eu/callcc/audrey/ui/playbar.ui")]
class Ui.Playbar : Gtk.Box { class Ui.Playbar : Adw.Bin {
public Subsonic.Song? song { get; set; } public Subsonic.Song? song { get; set; }
public Gdk.Paintable? playing_cover_art { get; set; } public Gdk.Paintable? playing_cover_art { get; set; }
public weak Playbin playbin { get; set; } public weak Playbin playbin { get; set; }