Compare commits

...

2 Commits

Author SHA1 Message Date
Martin Wagner
07a47d19ce highlight a possible Gtk bug in the code 2022-03-29 19:08:25 +02:00
Martin Wagner
80777db017 Revert "avoid unintended button reveal"
This reverts commit 9b841df3e4.
2022-03-29 19:05:52 +02:00

View File

@ -2683,6 +2683,7 @@ class PlaylistWindow(Gtk.Overlay):
# connect
self._back_to_current_song_button.connect("clicked", self._on_back_to_current_song_button_clicked)
scroll.get_vadjustment().connect("value-changed", self._on_show_hide_back_button)
self._treeview.connect("notify::selected-path", self._on_show_hide_back_button)
settings.bind("mini-player", self, "no-show-all", Gio.SettingsBindFlags.GET)
settings.bind("mini-player", self, "visible", Gio.SettingsBindFlags.INVERT_BOOLEAN|Gio.SettingsBindFlags.GET)
@ -2691,7 +2692,7 @@ class PlaylistWindow(Gtk.Overlay):
self.add_overlay(self._back_button_revealer)
def _on_show_hide_back_button(self, *args):
visible_range=self._treeview.get_visible_range()
visible_range=self._treeview.get_visible_range() # not always accurate possibly due to a bug in Gtk
if visible_range is None or self._treeview.get_property("selected-path") is None:
self._back_button_revealer.set_reveal_child(False)
else: