7
property string text: "Button"
8
property string icon: "Icon.png"
10
color: "black"; smooth: true; opacity: 0.75
11
width: imgItem.width+20; height: txtItem.height + 6 + imgItem.height;
12
transformOrigin: Rectangle.Center;
14
MouseRegion { id: mr; anchors.fill: parent; onClicked: container.clicked() }
17
id: imgItem; source: gui.iconPath+container.icon; anchors.top: container.top; anchors.horizontalCenter: container.horizontalCenter;
18
width: gui.height/8; height: gui.height/8
22
id: txtItem; text: container.text; anchors.top: imgItem.bottom; anchors.horizontalCenter: container.horizontalCenter;
23
color: "White"; font.pointSize: gui.height/32; horizontalAlignment: Qt.AlignHCenter
28
name: "Pressed"; when: mr.pressed == true
29
PropertyChanges { target: container; scale: 2.0 }
30
PropertyChanges { target: container; opacity: 1 }
35
transitions: Transition {
36
NumberAnimation { matchProperties: "scale"; easing: "easeOutExpo"; duration: 200 }
37
NumberAnimation { matchProperties: "opacity"; easing: "easeInQuad"; duration: 200 }