From 402ab0d509b04452bbc16159f5cb1639b0d96253 Mon Sep 17 00:00:00 2001 From: Max Date: Mon, 26 Nov 2018 20:05:20 +0100 Subject: [PATCH] added checkButton --- CalculatorEndPage.qml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/CalculatorEndPage.qml b/CalculatorEndPage.qml index 28e65ce..bee71a2 100644 --- a/CalculatorEndPage.qml +++ b/CalculatorEndPage.qml @@ -10,7 +10,7 @@ Page { TextField { id: sumInput placeholderText: "sum" - visible: !won.visible + visible: !endPageVisibility validator: IntValidator {bottom: -1000000; top: 1000000;} anchors { horizontalCenter: parent.horizontalCenter @@ -19,6 +19,24 @@ Page { } Keys.onReturnPressed: calculator.checkSum(sumInput.text) } + + RoundButton { + id: checkButton + height: parent.width * 0.2 + width: height + text: "check" + font.pixelSize: parent.width * 0.03 + visible: !endPageVisibility + anchors { + horizontalCenter: parent.horizontalCenter + top: parent.top + topMargin: parent.height * 0.3 + } + onClicked: { + calculator.checkSum(sumInput.text) + } + } + Label { id: won text: calculator.endPageLabelText @@ -71,6 +89,7 @@ Page { height: parent.width * 0.2 width: height text: "home" + font.pixelSize: parent.width * 0.03 visible: endPageVisibility anchors { horizontalCenter: parent.horizontalCenter @@ -83,4 +102,5 @@ Page { calculator.state = "starting" } } + }