X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=qml%2FLichViet%2FButton.qml;fp=qml%2FLichViet%2FButton.qml;h=662c7142bdb81106706715da05eb4c8b35a6dfb4;hb=274c1daf9c51c4127195b5e8370722887dace99e;hp=c1a24d751e8b0f094bcd7704a88f0a77ef0edbcd;hpb=0527c61e3bdd3540dbe553e87e24081fe54f6b15;p=lichviet diff --git a/qml/LichViet/Button.qml b/qml/LichViet/Button.qml index c1a24d7..662c714 100644 --- a/qml/LichViet/Button.qml +++ b/qml/LichViet/Button.qml @@ -23,45 +23,39 @@ Item { signal clicked property string text - property bool keyUsing: false - BorderImage { - id: buttonImage - source: theme_manager.theme.toolbar.button_sci - width: container.width; height: container.height - } - BorderImage { - id: pressed - opacity: 0 - source: theme_manager.theme.toolbar.button_pressed_sci - width: container.width; height: container.height - } - MouseArea { - id: mouseRegion - anchors.fill: buttonImage - onClicked: { container.clicked(); } - } - Text { - id: btnText - color: if(container.keyUsing){"#D0D0D0";} else {"#FFFFFF";} - anchors.centerIn: buttonImage; font.bold: true - text: container.text; style: Text.Raised; styleColor: "black" - font.pixelSize: 24 - font.family: "Tahoma" - } - states: [ - State { - name: "Pressed" - when: mouseRegion.pressed == true - PropertyChanges { target: pressed; opacity: 1 } - }, - State { - name: "Focused" - when: container.activeFocus == true - PropertyChanges { target: btnText; color: "#FFFFFF" } + Rectangle { + + anchors.fill: parent + y:parent.y + width:parent.width + height:parent.height + + radius: 4 + border.color: "grey" + + Text { + id: button1 + color: "#000000" + anchors.centerIn: parent; font.bold: true + text: container.text; style: Text.Raised; styleColor: "black" + font.pixelSize: 22 + font.family: "Tahoma" + } + + MouseArea { + id: mouseRegion + anchors.fill: parent + onClicked: { container.clicked(); } + + onPressed: { + parent.color = "blue" + } + + onReleased: { + parent.color = "white" + } } - ] - transitions: Transition { - ColorAnimation { target: btnText; } } + }