author | sheepluva |
Sun, 01 May 2016 21:09:45 +0200 | |
branch | qmlfrontend |
changeset 11787 | bcba7938ccb5 |
parent 10422 | 4cf23d4c7624 |
permissions | -rw-r--r-- |
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 |
|
11787
bcba7938ccb5
qmlfrontend/map-preview: add hog count display thingy (only displays "?" for now)
sheepluva
parents:
10422
diff
changeset
|
39 |
border.color: "#ffcc00" |
10422 | 40 |
} |
41 |
}] |
|
10402 | 42 |
} |