diff options
author | Aylur <[email protected]> | 2025-01-28 12:18:57 +0100 |
---|---|---|
committer | Aylur <[email protected]> | 2025-01-28 12:18:57 +0100 |
commit | cb1578a7917339a9df9fa87773a739a0249501e2 (patch) | |
tree | 0877d464756e4748c643acc0bae3db20580ac6d3 | |
parent | a23ef6a6c0bd9da6c68f8bc5e6d8e1efd9210e09 (diff) |
fix #264: mpris exampe
-rw-r--r-- | examples/gtk3/js/simple-bar/widget/Bar.tsx | 4 | ||||
-rw-r--r-- | examples/gtk3/py/simple-bar/widget/Bar.py | 2 | ||||
-rw-r--r-- | examples/gtk3/vala/simple-bar/widget/Bar.vala | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/gtk3/js/simple-bar/widget/Bar.tsx b/examples/gtk3/js/simple-bar/widget/Bar.tsx index 6592f6a..8310495 100644 --- a/examples/gtk3/js/simple-bar/widget/Bar.tsx +++ b/examples/gtk3/js/simple-bar/widget/Bar.tsx @@ -79,13 +79,13 @@ function Media() { )} /> <label - label={bind(ps[0], "title").as(() => + label={bind(ps[0], "metadata").as(() => `${ps[0].title} - ${ps[0].artist}` )} /> </box> ) : ( - "Nothing Playing" + <label label="Nothing Playing" /> ))} </box> } diff --git a/examples/gtk3/py/simple-bar/widget/Bar.py b/examples/gtk3/py/simple-bar/widget/Bar.py index 555ab85..d5bf38d 100644 --- a/examples/gtk3/py/simple-bar/widget/Bar.py +++ b/examples/gtk3/py/simple-bar/widget/Bar.py @@ -89,7 +89,7 @@ class Media(Gtk.Box): self.add(label) player.bind_property( - "title", + "metadata", label, "label", SYNC, diff --git a/examples/gtk3/vala/simple-bar/widget/Bar.vala b/examples/gtk3/vala/simple-bar/widget/Bar.vala index 28b32ef..0746969 100644 --- a/examples/gtk3/vala/simple-bar/widget/Bar.vala +++ b/examples/gtk3/vala/simple-bar/widget/Bar.vala @@ -84,7 +84,7 @@ class Media : Gtk.Box { }; Astal.widget_set_class_names(cover, {"Cover"}); - player.bind_property("title", label, "label", BindingFlags.SYNC_CREATE, (_, src, ref trgt) => { + player.bind_property("metadata", label, "label", BindingFlags.SYNC_CREATE, (_, src, ref trgt) => { var title = player.title; var artist = player.artist; trgt.set_string(@"$artist - $title"); |