-
Notifications
You must be signed in to change notification settings - Fork 1
/
ItemOutline.qml
112 lines (91 loc) · 2.43 KB
/
ItemOutline.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import QtQuick 2.0
import QtGraphicalEffects 1.12
Rectangle {
id: root
property bool show
anchors.margins: vpx(-4)
radius: height/2
opacity: show ? 0.8 : 0
//Behavior on opacity { NumberAnimation { duration: 50 } }
border.width: vpx(2)
border.color: "white"
color: "transparent"
SequentialAnimation {
id: animateOpacity
loops: Animation.Infinite
running: root.show
NumberAnimation {
target: root
property: "opacity"
from: 0.8; to: 0.3
easing.type: Easing.InCubic; duration: 2000
}
NumberAnimation {
target: root
property: "opacity"
to: 0.8
easing.type: Easing.OutCubic; duration: 3000
}
PauseAnimation { duration: 100 }
}
/*Rectangle {
id: imageMask
anchors.fill: parent
anchors.margins: vpx(4)
radius: outline.radius - anchors.margins
visible: false
}
Item {
id: gradient
anchors.fill: imageMask
anchors.margins: vpx(4)
RadialGradient {
anchors.fill: parent
gradient: Gradient {
GradientStop { position: 0.0; color: "transparent" }
GradientStop { position: 0.5; color: "white" }
}
}
visible: false
}
OpacityMask {
id: gradmask
anchors.fill: imageMask
source: gradient
maskSource: imageMask
visible: false
}
Image {
id: highlightgrad
width: imageMask.width
height: imageMask.height*2
source: "assets/images/highlightgradient.png"
//transform: Rotation { origin.x: width/2; origin.y: height/2; angle: 45}
visible: false
}
SequentialAnimation {
id: animatePos
loops: Animation.Infinite
running: root.show
NumberAnimation {
target: gradientmask
property: "opacity"
from: 0; to: 1
easing.type: Easing.InCubic; duration: 3000
}
NumberAnimation {
target: gradientmask
property: "opacity"
from: 1; to: 0
easing.type: Easing.OutCubic; duration: 5000
}
PauseAnimation { duration: 100 }
}
OpacityMask {
id: gradientmask
anchors.fill: imageMask
source: highlightgrad
maskSource: gradmask
opacity: 0
}//*/
}