aboutsummaryrefslogtreecommitdiffstats
path: root/qml/Button.qml
diff options
context:
space:
mode:
Diffstat (limited to 'qml/Button.qml')
-rw-r--r--qml/Button.qml21
1 files changed, 19 insertions, 2 deletions
diff --git a/qml/Button.qml b/qml/Button.qml
index 3c02dea..22469d1 100644
--- a/qml/Button.qml
+++ b/qml/Button.qml
@@ -4,9 +4,11 @@ import QtQuick 1.0
id: container
property variant text
+ property variant image
signal clicked
- height: text.height + 10; width: text.width + 20
+ height: buttonImage.height + 10;
+ width: text.width + buttonImage.width + 15
border.width: 1
radius: 4
smooth: true
@@ -30,11 +32,26 @@ import QtQuick 1.0
onClicked: container.clicked()
}
+ Image {
+ id: buttonImage
+ y: 5
+ x: 5
+ source: container.image
+ height: 25
+ width: 25
+ //anchors.horizontalCenter: parent.horizontalCenter
+ //anchors.fill: parent
+ }
+
Text {
id: text
- anchors.centerIn:parent
+ x: buttonImage.width +10
+ y: buttonImage.y
+ //anchors.centerIn:parent
font.pointSize: 10
text: parent.text
+ //anchors.verticalCenterOffset: 20
+ //anchors.horizontalCenterOffset: 59
color: activePalette.buttonText
}
}