summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--multilayer-dashboard/Button.qml23
-rw-r--r--multilayer-dashboard/TapAndHoldWidget.qml20
-rw-r--r--multilayer-dashboard/TapWidget.qml1
3 files changed, 18 insertions, 26 deletions
diff --git a/multilayer-dashboard/Button.qml b/multilayer-dashboard/Button.qml
index 757e213..16927d4 100644
--- a/multilayer-dashboard/Button.qml
+++ b/multilayer-dashboard/Button.qml
@@ -7,7 +7,6 @@ Rectangle {
property string text : "Press me, Hold me, Strike me"
property int counter : 0
property string bgColor: "steelblue"
- property bool marked : false
property bool enabled : state != "disabled"
@@ -26,25 +25,22 @@ Rectangle {
Rectangle {
id: mark
+ anchors.verticalCenter: button.verticalCenter
x: 10
- y: 5
- width: 0
- height: 0
- radius: 30
+ width: button.height/2
+ height: button.height/2
+ radius: button.height/2
color: "black"
opacity: 1.0
smooth: true
+ visible: false
}
function toggleMark() {
- button.marked = !button.marked
- if (button.marked) {
- mark.width = 30
- mark.height = 30
- } else {
- mark.width = 0
- mark.height = 0
- }
+ if (mark.visible == false)
+ mark.visible = true
+ else
+ mark.visible = false
}
function increaseCounter() {
@@ -55,6 +51,7 @@ Rectangle {
id: labelText
text: parent.text + (counter ? " "+counter : "")
anchors.centerIn: parent
+ font.pointSize: 15
}
Rectangle {
diff --git a/multilayer-dashboard/TapAndHoldWidget.qml b/multilayer-dashboard/TapAndHoldWidget.qml
index e140d7a..2ee9af1 100644
--- a/multilayer-dashboard/TapAndHoldWidget.qml
+++ b/multilayer-dashboard/TapAndHoldWidget.qml
@@ -47,7 +47,6 @@ Rectangle {
property string text : "Press me, Hold me"
property int counter : 0
property string bgColor: "steelblue"
- property bool marked : false
property bool enabled : state != "disabled"
@@ -65,25 +64,19 @@ Rectangle {
Rectangle {
id: mark
+ anchors.verticalCenter: button.verticalCenter
x: 10
- y: 5
- width: 0
- height: 0
- radius: 30
+ width: button.height/2
+ height: button.height/2
+ radius: button.height/2
color: "black"
opacity: 1.0
smooth: true
+ visible: false
}
function toggleMark() {
- button.marked = !button.marked
- if (button.marked) {
- mark.width = 30
- mark.height = 30
- } else {
- mark.width = 0
- mark.height = 0
- }
+ mark.visible = !mark.visible
}
function increaseCounter() {
@@ -94,6 +87,7 @@ Rectangle {
id: labelText
text: parent.text + (counter ? " "+counter : "")
anchors.centerIn: parent
+ font.pointSize: 14
}
Rectangle {
diff --git a/multilayer-dashboard/TapWidget.qml b/multilayer-dashboard/TapWidget.qml
index 8c622e2..939d968 100644
--- a/multilayer-dashboard/TapWidget.qml
+++ b/multilayer-dashboard/TapWidget.qml
@@ -61,6 +61,7 @@ Rectangle {
id: labelText
text: "Tap me!!!"
anchors.centerIn: parent
+ font.pointSize: 14
}
MouseArea {