From 2cd966e53cb1ece82b0e982a69c813cebe59c386 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 27 Nov 2018 19:32:17 +0100 Subject: [PATCH] added Labels on CalculatorStartPage --- CalculatorMainPage.qml | 1 + CalculatorStartPage.qml | 38 ++++++++++++++++++++++++++++++++------ 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/CalculatorMainPage.qml b/CalculatorMainPage.qml index 0d1bbd4..f1c6cd6 100644 --- a/CalculatorMainPage.qml +++ b/CalculatorMainPage.qml @@ -17,6 +17,7 @@ Page { Label { id: gameProcess text: calculator.actualNumCount + " of " + calculator.numCount + font.pixelSize: parent.width * 0.05 anchors { right: parent.right rightMargin: parent.width * 0.025 diff --git a/CalculatorStartPage.qml b/CalculatorStartPage.qml index 62a6a74..4b00ee9 100644 --- a/CalculatorStartPage.qml +++ b/CalculatorStartPage.qml @@ -10,14 +10,12 @@ Page { ColumnLayout { id: column - spacing: 5 + //spacing: height / 40 width: parent.width anchors.fill: parent anchors.topMargin: parent.height * 0.02 anchors.bottomMargin: parent.height * 0.02 - onSpacingChanged: console.log(parent.width) - Label { id: heading font.pixelSize: parent.width * 0.075 @@ -27,6 +25,13 @@ Page { Layout.rightMargin: parent.width * 0.5 - width * 0.5 } + Label { + id: tickIntervalInfo + text: "Interval:" + font.pixelSize: parent.height * 0.05 + Layout.leftMargin: parent.width * 0.05 + } + TextField { id: tickInterval @@ -40,10 +45,17 @@ Page { Keys.onReturnPressed: root.start() } + Label { + id: numCountInfo + text: "Summands:" + font.pixelSize: parent.height * 0.05 + Layout.leftMargin: parent.width * 0.05 + } + TextField { id: numCount text: calculator.numCount - placeholderText: "numbercount" + placeholderText: "summands" validator: IntValidator {bottom: 1; top: 100000;} horizontalAlignment: Qt.AlignHCenter Layout.fillWidth: true @@ -52,10 +64,17 @@ Page { Keys.onReturnPressed: root.start() } + Label { + id: minInfo + text: "Minimum:" + font.pixelSize: parent.height * 0.05 + Layout.leftMargin: parent.width * 0.05 + } + TextField { id: min text: calculator.min - placeholderText: "min" + placeholderText: "minimum" validator: IntValidator {bottom: -100000; top: 100000;} horizontalAlignment: Qt.AlignHCenter Layout.fillWidth: true @@ -64,10 +83,17 @@ Page { Keys.onReturnPressed: root.start() } + Label { + id: maxInfo + text: "Maximum:" + font.pixelSize: parent.height * 0.05 + Layout.leftMargin: parent.width * 0.05 + } + TextField { id: max text: calculator.max - placeholderText: "max" + placeholderText: "maximum" validator: IntValidator {bottom: -100000; top: 100000;} horizontalAlignment: Qt.AlignHCenter Layout.fillWidth: true