Add drop shadow and resize select border in CVElem
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user