-
Notifications
You must be signed in to change notification settings - Fork 2
/
Material_Rectangle.qml
57 lines (55 loc) · 1.63 KB
/
Material_Rectangle.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
import QtQuick 2.15
import QtQuick.Controls.Material 2.15
import QtQuick.Controls.Material.impl 2.15
import QtQuick.Controls 6.2
import Qt5Compat.GraphicalEffects
Rectangle {
id: control
radius: 4
property int elevation: 8
property bool roundLeftTop: true
property bool roundRightTop: true
property bool roundLeftBottom: true
property bool roundRightBottomr: true
Rectangle {
anchors.left: parent.left
anchors.top: parent.top
visible: !control.roundLeftTop
width: control.radius * 2
height: control.radius * 2
color: control.color
}
Rectangle {
anchors.right: parent.right
anchors.top: parent.top
visible: !control.roundRightTop
width: control.radius * 2
height: control.radius * 2
color: control.color
}
Rectangle {
anchors.left: parent.left
anchors.bottom: parent.bottom
visible: !control.roundLeftBottom
width: control.radius * 2
height: control.radius * 2
color: control.color
}
Rectangle {
anchors.right: parent.right
anchors.bottom: parent.bottom
visible: !control.roundRightBottomr
width: control.radius * 2
height: control.radius * 2
color: control.color
}
layer.enabled: true
layer.effect: ElevationEffect {
elevation: control.elevation
}
}
/*##^##
Designer {
D{i:0;autoSize:true;height:480;width:640}
}
##^##*/