[vlc-devel] [PATCH 55/55] qml: change coloring of playlist delegate
Fatih Uzunoglu
fuzun54 at outlook.com
Thu Jan 7 21:37:08 UTC 2021
---
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"
--
2.27.0
More information about the vlc-devel
mailing list