Skip to content

Commit

Permalink
improved initial state
Browse files Browse the repository at this point in the history
  • Loading branch information
SoongNoonien committed Nov 9, 2024
1 parent 2b778d3 commit c3e36ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/plattenalbum.py
Original file line number Diff line number Diff line change
Expand Up @@ -2587,7 +2587,7 @@ def __init__(self, client, settings):
playback_controls=PlaybackControls(client, settings)

# stack
self._stack=Gtk.Stack()
self._stack=Gtk.Stack(visible=False)
self._stack.add_named(window_handle, "cover")
self._stack.add_named(self._lyrics_window, "lyrics")

Expand All @@ -2607,7 +2607,7 @@ def __init__(self, client, settings):
box=Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
box.append(self._stack)
box.append(playlist_window)
self._toolbar_view=Adw.ToolbarView()
self._toolbar_view=Adw.ToolbarView(reveal_bottom_bars=False)
self._toolbar_view.add_top_bar(header_bar)
self._toolbar_view.set_content(box)
self._toolbar_view.add_bottom_bar(playback_controls)
Expand All @@ -2628,11 +2628,13 @@ def _on_lyrics_toggled(self, *args):

def _on_song_changed(self, emitter, song, songid, state):
if (song:=self._client.currentsong()):
self._stack.set_visible(True)
self._title.set_title(song["title"][0])
self._title.set_subtitle(str(song["artist"]))
if self.get_property("show-lyrics"):
self._lyrics_window.display(song)
else:
self._stack.set_visible(False)
self._clear_title()
if self.get_property("show-lyrics"):
self._lyrics_window.clear()
Expand Down

0 comments on commit c3e36ba

Please sign in to comment.