X-Git-Url: http://git.maemo.org/git/?p=lichviet;a=blobdiff_plain;f=qml%2FDatePicker%2Fcomponent%2FButton.qml;h=febd872e3d70791362e42ee95169fff0a4ef5b1a;hp=cad0b36179f9888016913dc3857eae98943bb8a3;hb=1dad491bc9e86781cc3cb99b7c156a267a019787;hpb=c37371da2f046d1a0ada7a7ab8e3f72ba0c2341f diff --git a/qml/DatePicker/component/Button.qml b/qml/DatePicker/component/Button.qml index cad0b36..febd872 100644 --- a/qml/DatePicker/component/Button.qml +++ b/qml/DatePicker/component/Button.qml @@ -1,8 +1,6 @@ import QtQuick 1.1 Item { - id: container - property string buttonName: "NOT SET" property string target: "NOT SET" property string text: "NOT SET" @@ -13,49 +11,19 @@ Item { property bool active: false - property string bgImage: theme_manager.theme.datepicker.button - property string bgImagePressed: theme_manager.theme.datepicker.button_pressed - property string bgImageActive: theme_manager.theme.datepicker.button_active - - // These Component properties can be used to modify the Button's LaF - // from the calling component. They have to define a BorderImage component. - property Component bg: defaultBackground - property Component bgPressed: defaultPressedBackground - property Component bgActive: defaultActiveBackground - signal clicked(string target, string button) width: 140 height: 60 - opacity: enabled ? 1.0 : 0.5 + opacity: enabled ? 1.0 : 0.5 - Loader { - id: background - sourceComponent: container.bg + Rectangle{ anchors.fill: parent - } - - Component { - id: defaultBackground - BorderImage { - border { top: 8; bottom: 8; left: 8; right: 8 } - source: bgImage - } - } - Component { - id: defaultPressedBackground - BorderImage { - border { top: 8; bottom: 8; left: 8; right: 8 } - source: bgImagePressed - } - } - - Component { - id: defaultActiveBackground - BorderImage { - border { top: 8; bottom: 8; left: 8; right: 8 } - source: bgImageActive - } + width: container.width + height: container.height + color:"white" + border.color: "black" + radius: 8 } Text { @@ -73,22 +41,4 @@ Item { } color: container.fontColor } - - MouseArea { - id: mouseArea - anchors.fill: parent - - } - - states: [ - State { - name: 'pressed'; when: mouseArea.pressed - PropertyChanges { target: background; sourceComponent: container.bgPressed } - }, - State { - name: 'active'; when: container.active - PropertyChanges { target: background; sourceComponent: container.defaultActiveBackground; } - } - ] - }