vlc | branch: master | Abel Tesfaye <[email protected]> | Tue Aug  6 
16:32:56 2019 +0300| [78817017db7c27385108d64a214da199ee2688fe] | committer: 
Jean-Baptiste Kempf

qml: add glow and rounded border on ListItem

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

 modules/gui/qt/qml/utils/ListItem.qml | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/qml/utils/ListItem.qml 
b/modules/gui/qt/qml/utils/ListItem.qml
index 5a1192b4ca..e4f9b06d8b 100644
--- a/modules/gui/qt/qml/utils/ListItem.qml
+++ b/modules/gui/qt/qml/utils/ListItem.qml
@@ -19,6 +19,8 @@
 import QtQuick 2.11
 import QtQuick.Controls 2.4
 import QtQuick.Layouts 1.3
+import QtGraphicalEffects 1.0
+
 import "qrc:///style/"
 
 NavigableFocusScope {
@@ -35,7 +37,7 @@ NavigableFocusScope {
     property alias line2: line2_text.text
     property alias imageText: cover_text.text
 
-    property alias color: linerect.color
+    property alias color: glow.color
 
     Component {
         id: actionAdd
@@ -86,6 +88,22 @@ NavigableFocusScope {
                 root.itemDoubleClicked(mouse.buttons, mouse.modifiers);
             }
         }
+        RectangularGlow {
+            id: glow
+            anchors.fill: innerRect
+            spread: 0.1
+            glowRadius: VLCStyle.margin_xxsmall
+            color: VLCStyle.colors.getBgColor(
+                       root.isSelected, root.hovered,
+                       root.activeFocus)
+        }
+        Rectangle {
+            id: innerRect
+            radius: height / 10
+            anchors.fill: parent
+            anchors.margins: VLCStyle.margin_xxsmall
+            anchors.verticalCenter: parent.verticalCenter
+            color: VLCStyle.colors.bg
 
         RowLayout {
             anchors.fill: parent
@@ -183,5 +201,7 @@ NavigableFocusScope {
                 }
             }
         }
+
+        }
     }
 }

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to