From 3c6ca152dc19ce76e45492a2ca25d971170537f1 Mon Sep 17 00:00:00 2001 From: restitux Date: Sun, 28 Aug 2022 00:29:49 -0400 Subject: [PATCH] Add drop shadow and resize select border in CVElem --- layouts/components/ContentViewElement.qml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/layouts/components/ContentViewElement.qml b/layouts/components/ContentViewElement.qml index 69badce..2213e0d 100644 --- a/layouts/components/ContentViewElement.qml +++ b/layouts/components/ContentViewElement.qml @@ -1,5 +1,6 @@ import QtQuick 2.12 import QtQuick.Controls 1.4 +import QtGraphicalEffects 1.12 Column { @@ -37,11 +38,12 @@ Column { property int childHeight: 300 property int childWidth: 300 * 0.68 property int borderWidth: 7 - property int borderRadius: 7 + property int borderRadius: 3 height: 300 + (borderWidth * 2) width: (300 * 0.68) + (borderWidth * 2) state: (elemSelected && (index == xIndex)) ? "selected" : "deselected" Image { + id: img height: parent.childHeight width: parent.childWidth anchors.horizontalCenter: parent.horizontalCenter @@ -58,6 +60,15 @@ Column { border.width: parent.borderWidth radius: parent.borderRadius } + DropShadow { + anchors.fill: img + horizontalOffset: 5 + verticalOffset: 5 + radius: 8.0 + samples: 17 + color: "#80000000" + source: img + } states: [ State { name: "deselected" @@ -78,7 +89,7 @@ Column { Transition { NumberAnimation { properties: "border.width" - duration: 50 + duration: 100 easing.type: Easing.Linear } }