[vlc-devel] [PATCH 42/55] qml: show border for playlist delegate in selection mode

Fatih Uzunoglu fuzun54 at outlook.com
Thu Jan 7 21:36:55 UTC 2021


---
 modules/gui/qt/playlist/qml/PlaylistDelegate.qml | 10 ++++++++--
 modules/gui/qt/style/VLCColors.qml               |  1 -
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/modules/gui/qt/playlist/qml/PlaylistDelegate.qml b/modules/gui/qt/playlist/qml/PlaylistDelegate.qml
index 7172e7384b..c774e332e8 100644
--- a/modules/gui/qt/playlist/qml/PlaylistDelegate.qml
+++ b/modules/gui/qt/playlist/qml/PlaylistDelegate.qml
@@ -38,13 +38,19 @@ Rectangle {
 
     property alias hovered: mouseArea.containsMouse
 
+    border.width: VLCStyle.dp(1)
+    border.color: {
+        if (activeFocus && (listView.mode === PlaylistListView.Mode.Select))
+            colors.caption
+        else
+            "transparent"
+    }
+
     color: {
         if (selected)
             colors.plItemSelected
         else if (hovered)
             colors.plItemHovered
-        else if (activeFocus)
-            colors.plItemFocused
         else
             return "transparent"
     }
diff --git a/modules/gui/qt/style/VLCColors.qml b/modules/gui/qt/style/VLCColors.qml
index a0b6ab57ea..ea08bd7c95 100644
--- a/modules/gui/qt/style/VLCColors.qml
+++ b/modules/gui/qt/style/VLCColors.qml
@@ -91,7 +91,6 @@ Item {
     // playlist
     property color plItemHovered:  bannerHover
     property color plItemSelected: isThemeDark ? "#1E1E1E" : "#EDEDED"
-    property color plItemFocused:  blendColors(plItemSelected, plItemHovered, 0.25)
 
     // basic color definitions for color blending:
     property color black: "black"
-- 
2.27.0



More information about the vlc-devel mailing list