import QtQuick 1.1\r
\r
Item {\r
- id: container\r
-\r
property string buttonName: "NOT SET"\r
property string target: "NOT SET"\r
property string text: "NOT SET"\r
\r
property bool active: false\r
\r
- property string bgImage: theme_manager.theme.datepicker.button\r
- property string bgImagePressed: theme_manager.theme.datepicker.button_pressed\r
- property string bgImageActive: theme_manager.theme.datepicker.button_active\r
-\r
- // These Component properties can be used to modify the Button's LaF\r
- // from the calling component. They have to define a BorderImage component.\r
- property Component bg: defaultBackground\r
- property Component bgPressed: defaultPressedBackground\r
- property Component bgActive: defaultActiveBackground\r
-\r
signal clicked(string target, string button)\r
\r
width: 140\r
height: 60\r
- opacity: enabled ? 1.0 : 0.5 \r
+ opacity: enabled ? 1.0 : 0.5\r
\r
- Loader {\r
- id: background\r
- sourceComponent: container.bg\r
+ Rectangle{\r
anchors.fill: parent\r
- }\r
-\r
- Component {\r
- id: defaultBackground\r
- BorderImage {\r
- border { top: 8; bottom: 8; left: 8; right: 8 }\r
- source: bgImage\r
- }\r
- }\r
- Component {\r
- id: defaultPressedBackground\r
- BorderImage {\r
- border { top: 8; bottom: 8; left: 8; right: 8 }\r
- source: bgImagePressed\r
- }\r
- }\r
-\r
- Component {\r
- id: defaultActiveBackground\r
- BorderImage {\r
- border { top: 8; bottom: 8; left: 8; right: 8 }\r
- source: bgImageActive\r
- }\r
+ width: container.width\r
+ height: container.height\r
+ color:"white"\r
+ border.color: "black"\r
+ radius: 8\r
}\r
\r
Text {\r
}\r
color: container.fontColor\r
}\r
-\r
- MouseArea {\r
- id: mouseArea\r
- anchors.fill: parent\r
-\r
- }\r
-\r
- states: [\r
- State {\r
- name: 'pressed'; when: mouseArea.pressed\r
- PropertyChanges { target: background; sourceComponent: container.bgPressed }\r
- },\r
- State {\r
- name: 'active'; when: container.active\r
- PropertyChanges { target: background; sourceComponent: container.defaultActiveBackground; }\r
- }\r
- ]\r
-\r
}\r