summaryrefslogtreecommitdiffstats
path: root/qml/FolderPage.qml
diff options
context:
space:
mode:
Diffstat (limited to 'qml/FolderPage.qml')
-rw-r--r--qml/FolderPage.qml19
1 files changed, 14 insertions, 5 deletions
diff --git a/qml/FolderPage.qml b/qml/FolderPage.qml
index 95faaf1..d61a530 100644
--- a/qml/FolderPage.qml
+++ b/qml/FolderPage.qml
@@ -89,6 +89,7 @@ Page {
Component.onCompleted: positionViewAtBeginning()
delegate: PlaylistDelegate {
+ id: playlistDelegate
title: (modelData.type === SpotifyPlaylist.Playlist || modelData.type === SpotifyPlaylist.Folder ? modelData.name
: (modelData.type === SpotifyPlaylist.Starred ? "Starred"
: "Inbox"))
@@ -125,16 +126,24 @@ Page {
onPressAndHold: { menu.playlist = modelData; menu.open(); }
property string staticIcon
- Component.onCompleted: {
+
+ function updateIcon() {
if (modelData.type === SpotifyPlaylist.Playlist)
- staticIcon = "image://theme/icon-m-music-video-all-songs";
+ staticIcon = theme.inverted ? "image://theme/icon-m-music-video-all-songs" : "images/icon-m-music-video-all-songs-black.png";
else if (modelData.type === SpotifyPlaylist.Starred)
- staticIcon = "image://theme/icon-m-common-favorite-mark-inverse";
+ staticIcon = "image://theme/icon-m-common-favorite-mark" + (theme.inverted ? "-inverse" : "");
else if (modelData.type === SpotifyPlaylist.Inbox)
- staticIcon = "image://theme/icon-m-toolbar-directory-move-to-white-selected";
+ staticIcon = theme.inverted ? "image://theme/icon-m-toolbar-directory-move-to-white-selected" : "images/icon-m-toolbar-directory-move-to-black.png";
else if (modelData.type === SpotifyPlaylist.Folder)
- staticIcon = "image://theme/icon-m-toolbar-directory-selected"
+ staticIcon = theme.inverted ? "image://theme/icon-m-toolbar-directory-selected" : "images/icon-m-toolbar-directory-black.png"
+ }
+
+ Connections {
+ target: theme
+ onInvertedChanged: playlistDelegate.updateIcon()
}
+
+ Component.onCompleted: updateIcon()
}
header: ViewHeader {