[gnome-music/wip/mschraal/gtk4: 66/84] Correctly reveal PlayerToolbar



commit 7bffe0916f948e24a4821327a42d5d3f520707d7
Author: Marinus Schraal <mschraal gnome org>
Date:   Sun May 3 01:12:46 2020 +0200

    Correctly reveal PlayerToolbar

 gnomemusic/widgets/playertoolbar.py | 4 ++--
 gnomemusic/window.py                | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/widgets/playertoolbar.py b/gnomemusic/widgets/playertoolbar.py
index c0a7e8eb..25735e92 100644
--- a/gnomemusic/widgets/playertoolbar.py
+++ b/gnomemusic/widgets/playertoolbar.py
@@ -132,10 +132,10 @@ class PlayerToolbar(Gtk.ActionBar):
         if (self._player.props.state == Playback.STOPPED
                 and not self._player.props.has_next
                 and not self._player.props.has_previous):
-            self.hide()
+            self.props.revealed = False
             return
 
-        self.show()
+        self.props.revealed = True
 
         if self._player.props.state == Playback.PLAYING:
             icon_name = "media-playback-pause-symbolic"
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 295b0862..53af710a 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -444,7 +444,7 @@ class Window(Gtk.ApplicationWindow):
     def _on_selection_mode_changed(self, widget, data=None):
         if (not self.props.selection_mode
                 and self._player.state == Playback.STOPPED):
-            self._player_toolbar.hide()
+            self._player_toolbar.props.revealed = False
 
     def _on_add_to_playlist(self, widget):
         if self.props.active_view == self.views[View.PLAYLIST]:
@@ -469,4 +469,4 @@ class Window(Gtk.ApplicationWindow):
 
         :param bool visible: actionbar visibility
         """
-        self._player_toolbar.set_visible(visible)
+        self._player_toolbar.props.revealed = visible


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]