[vlc-commits] qml: change coloring of playlist delegate
Fatih Uzunoglu
git at videolan.org
Tue Jan 12 13:21:07 UTC 2021
vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Jan 8 00:37:08 2021 +0300| [70a317534de1b6a8070831b4ad96a54ff908901e] | committer: Pierre Lamot
qml: change coloring of playlist delegate
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=70a317534de1b6a8070831b4ad96a54ff908901e
---
modules/gui/qt/playlist/qml/PlaylistDelegate.qml | 8 +++++---
modules/gui/qt/style/VLCColors.qml | 3 ++-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt/playlist/qml/PlaylistDelegate.qml b/modules/gui/qt/playlist/qml/PlaylistDelegate.qml
index 8b43aec894..3cf7d98adb 100644
--- a/modules/gui/qt/playlist/qml/PlaylistDelegate.qml
+++ b/modules/gui/qt/playlist/qml/PlaylistDelegate.qml
@@ -47,12 +47,14 @@ Rectangle {
}
color: {
- if (selected)
- colors.plItemSelected
+ if ((activeFocus && listView.mode !== PlaylistListView.Mode.Select) || (hovered && selected))
+ colors.plItemFocused
else if (hovered)
colors.plItemHovered
+ else if (selected)
+ colors.plItemSelected
else
- return "transparent"
+ "transparent"
}
height: artworkItem.height * 1.5
diff --git a/modules/gui/qt/style/VLCColors.qml b/modules/gui/qt/style/VLCColors.qml
index ea08bd7c95..70696e118f 100644
--- a/modules/gui/qt/style/VLCColors.qml
+++ b/modules/gui/qt/style/VLCColors.qml
@@ -90,7 +90,8 @@ Item {
// playlist
property color plItemHovered: bannerHover
- property color plItemSelected: isThemeDark ? "#1E1E1E" : "#EDEDED"
+ property color plItemSelected: blendColors(plItemHovered, plItemFocused, 0.5)
+ property color plItemFocused: isThemeDark ? "#1E1E1E" : "#EDEDED"
// basic color definitions for color blending:
property color black: "black"
More information about the vlc-commits
mailing list