[vlc-commits] qml: show border for playlist delegate in selection mode

Fatih Uzunoglu git at videolan.org
Tue Jan 12 13:20:53 UTC 2021


vlc | branch: master | Fatih Uzunoglu <fuzun54 at outlook.com> | Fri Jan  8 00:36:55 2021 +0300| [db538622f36ec674983f5c8730be58e8c0c9af91] | committer: Pierre Lamot

qml: show border for playlist delegate in selection mode

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=db538622f36ec674983f5c8730be58e8c0c9af91
---

 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"



More information about the vlc-commits mailing list