From dc3454f7d4cdf5245c6a3be22e212921b8847504 Mon Sep 17 00:00:00 2001 From: Zeno Albisser Date: Wed, 18 Aug 2010 11:29:15 -0400 Subject: adjusted some font sizes and rearranged point mark --- multilayer-dashboard/Button.qml | 23 ++++++++++------------- multilayer-dashboard/TapAndHoldWidget.qml | 20 +++++++------------- multilayer-dashboard/TapWidget.qml | 1 + 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 { -- cgit v1.2.3