10402
|
1 |
import QtQuick 2.0
|
|
2 |
|
|
3 |
Rectangle {
|
|
4 |
id: hwbutton
|
|
5 |
width: 360
|
|
6 |
height: 360
|
|
7 |
color: "#15193a"
|
|
8 |
radius: 8
|
|
9 |
border.width: 4
|
|
10 |
opacity: 1
|
|
11 |
|
|
12 |
signal clicked()
|
|
13 |
|
10422
|
14 |
Behavior on border.color {
|
|
15 |
ColorAnimation {}
|
|
16 |
}
|
|
17 |
|
10402
|
18 |
MouseArea {
|
|
19 |
id: mousearea
|
|
20 |
anchors.fill: parent
|
|
21 |
hoverEnabled: true
|
10422
|
22 |
onClicked: parent.clicked()
|
10402
|
23 |
}
|
10422
|
24 |
|
|
25 |
states: [
|
|
26 |
State {
|
|
27 |
when: mousearea.containsMouse
|
|
28 |
|
|
29 |
PropertyChanges {
|
|
30 |
target: hwbutton
|
|
31 |
border.color: "#eaea00"
|
|
32 |
}
|
|
33 |
}
|
|
34 |
, State {
|
|
35 |
when: !mousearea.containsMouse
|
|
36 |
|
|
37 |
PropertyChanges {
|
|
38 |
target: hwbutton
|
|
39 |
border.color: "#ea761d"
|
|
40 |
}
|
|
41 |
}]
|
10402
|
42 |
}
|