mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-26 11:47:25 +01:00
player: Implement MPRIS raise
This commit is contained in:
parent
31144dff46
commit
2092f25c57
2 changed files with 42 additions and 12 deletions
|
|
@ -55,19 +55,24 @@ mod imp {
|
|||
player_bar.playlist_hidden();
|
||||
}));
|
||||
|
||||
player_bar.connect_show_playlist(clone!(@weak playlist_page, @weak stack => move |_, show| {
|
||||
if show {
|
||||
playlist_page.scroll_to_current();
|
||||
stack.set_visible_child_name("playlist");
|
||||
} else {
|
||||
stack.set_visible_child_name("navigation");
|
||||
};
|
||||
}));
|
||||
player_bar.connect_show_playlist(
|
||||
clone!(@weak playlist_page, @weak stack => move |_, show| {
|
||||
if show {
|
||||
playlist_page.scroll_to_current();
|
||||
stack.set_visible_child_name("playlist");
|
||||
} else {
|
||||
stack.set_visible_child_name("navigation");
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
||||
self.player
|
||||
.bind_property("active", &self.player_bar_revealer.get(), "reveal-child")
|
||||
.sync_create()
|
||||
.build();
|
||||
|
||||
let obj = self.obj().to_owned();
|
||||
self.player.connect_raise(move |_| obj.present());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue