blob: 3d76fa7ba2cf3b5bd0b44a90fd3d8eed5c250fe6 (
plain)
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
|
import QtQuick 1.1
Rectangle {
property alias image: img.source
signal clicked
color: "transparent"
z: 2
MouseArea {
id: mouseArea
anchors.fill: parent
onClicked: parent.clicked()
}
Image {
id: img
smooth: true
anchors.fill: parent
}
states: State {
name: "pressed"; when: mouseArea.pressed
PropertyChanges { target: img; anchors.topMargin: 2; anchors.bottomMargin: -2 }
}
}
|