1 import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
2 import "../UIConstants.js" as Const
6 property alias text: textbox.text
7 property bool disabled: false
8 property int fontSize: 30
9 property string iconSource
11 state: mouseArea.pressed && !root.disabled ? "pressed" : "unpressed"
13 signal clicked(string label)
19 color: Const.SHADOW_COLOR;
25 color: root.disabled ? Const.COOL_GREY_COLOR : "black"
36 color: Const.WARM_GREY_COLOR
38 visible: root.state == "pressed"
46 source: root.iconSource == "" ? "" : "../" + root.iconSource
47 sourceSize.width: width
48 sourceSize.height: height
53 font.pixelSize: root.fontSize
54 elide: Text.ElideRight
55 color: root.disabled ? "gray" : "white"
56 anchors.left: box.left; anchors.right: box.right
57 anchors.margins: Const.DEFAULT_MARGIN
58 anchors.verticalCenter: box.verticalCenter
65 onClicked: root.clicked(root.label)
66 enabled: !root.disabled
72 PropertyChanges {target: shadow; x: Const.SHADOW_OFFSET}
73 PropertyChanges {target: shadow; y: Const.SHADOW_OFFSET}
74 PropertyChanges {target: box; x: 0}
75 PropertyChanges {target: box; y: 0}
79 PropertyChanges {target: shadow; x: Const.SHADOW_OFFSET}
80 PropertyChanges {target: shadow; y: Const.SHADOW_OFFSET}
81 PropertyChanges {target: box; x: Const.SHADOW_OFFSET}
82 PropertyChanges {target: box; y: Const.SHADOW_OFFSET}