-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFloatActionButton.qml
75 lines (60 loc) · 1.5 KB
/
FloatActionButton.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
import QtQuick 2.0
import QtGraphicalEffects 1.0
Rectangle {
property string mainRectColor
property real iconScale : 3.5
property string icon: ""
property real raio : 50
radius: raio
width: raio
height: raio
Connections {
target:createTaskDialog
onHidded:{
mainRect.color = mainRectColor;
fabIcon.rotation = 0;
}
}
DropShadow {
anchors.fill: mainRect
source:mainRect
horizontalOffset: 0
verticalOffset: 7
radius: 8.0
samples: 24
color: "#90000000"
transparentBorder: true
}
Rectangle {
id:mainRect
radius: raio
width: raio
height: raio
color: mainRectColor
anchors.fill: parent
Image {
id:fabIcon
anchors{
fill: parent
topMargin: parent.height/iconScale
leftMargin: parent.height/iconScale
rightMargin: parent.height/iconScale
bottomMargin: parent.height/iconScale
}
source: icon
Behavior on rotation {
NumberAnimation {
duration: 150
}
}
}
MouseArea {
anchors.fill: parent
onClicked: {
mainRect.color = Qt.darker(mainRectColor,1.2);
fabIcon.rotation = 90
createTaskDialog.show();
}
}
}
}