-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathView.qml
60 lines (42 loc) · 1.06 KB
/
View.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
import QtQuick 2.3
import Pyblish 0.1
Rectangle {
id: view
width: 100
height: 62
color: "transparent"
property int elevation
property color __color: Theme.backgroundColor
property int margins: 5
Item {
id: fill
anchors.fill: parent
visible: view.elevation != 0
Rectangle {
id: outerBorder
color: Qt.darker(view.__color, view.elevation > 0 ? 0.9 : 1.2)
radius: view.radius
anchors {
fill: parent
margins: view.elevation > 0 ? 0 : 1
}
border {
width: 1
color: Qt.darker(view.__color, 2)
}
}
Rectangle {
id: innerBorder
color: "transparent"
radius: view.radius
anchors {
fill: parent
margins: view.elevation > 0 ? 1 : 0
}
border {
width: 1
color: Qt.lighter(view.__color, 1.2)
}
}
}
}