[gnome-music/wip/jfelder/songwidget-menu-v3: 18/18] playlistswidget: Make SongWidget not selectable




commit 720870a6d910d99f319f34f138958b70093ee657
Author: Jean Felder <jfelder src gnome org>
Date:   Mon May 10 19:14:55 2021 +0200

    playlistswidget: Make SongWidget not selectable
    
    PlaylistContextMenu relied on the SongWidget being selectable in order
    to work. With its removal, this is not needed anymore.
    
    This also allows to remove some css rules which prevented labels and
    images from being hidden when a SongWidget was selected.

 data/org.gnome.Music.css              | 5 -----
 gnomemusic/widgets/playlistswidget.py | 1 -
 2 files changed, 6 deletions(-)
---
diff --git a/data/org.gnome.Music.css b/data/org.gnome.Music.css
index 4659aec06..5214c21c9 100644
--- a/data/org.gnome.Music.css
+++ b/data/org.gnome.Music.css
@@ -159,11 +159,6 @@ list {
 padding: 0px;
 }
 
-.content > row:selected {
-    background-color: @theme_base_color;
-    color: @theme_fg_color;
-}
-
 .playlistdialog-row:selected {
     color: @theme_fg_color;
     background-color: @theme_insensitive_bg_color;
diff --git a/gnomemusic/widgets/playlistswidget.py b/gnomemusic/widgets/playlistswidget.py
index 42ce28882..7e395f140 100644
--- a/gnomemusic/widgets/playlistswidget.py
+++ b/gnomemusic/widgets/playlistswidget.py
@@ -89,7 +89,6 @@ class PlaylistsWidget(Gtk.Box):
             self, coresong: CoreSong, playlist: Playlist) -> Gtk.ListBoxRow:
         can_dnd = not playlist.props.is_smart
         song_widget = SongWidget(coresong, can_dnd, True)
-        song_widget.props.selectable = True
         song_widget.props.show_song_number = False
         song_widget.props.menu = SongWidgetMenu(
             self._application, song_widget, playlist)


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