added Labels on CalculatorStartPage

This commit is contained in:
Max 2018-11-27 19:32:17 +01:00
parent 6de4ed1ae2
commit 2cd966e53c
2 changed files with 33 additions and 6 deletions

View file

@ -17,6 +17,7 @@ Page {
Label { Label {
id: gameProcess id: gameProcess
text: calculator.actualNumCount + " of " + calculator.numCount text: calculator.actualNumCount + " of " + calculator.numCount
font.pixelSize: parent.width * 0.05
anchors { anchors {
right: parent.right right: parent.right
rightMargin: parent.width * 0.025 rightMargin: parent.width * 0.025

View file

@ -10,14 +10,12 @@ Page {
ColumnLayout { ColumnLayout {
id: column id: column
spacing: 5 //spacing: height / 40
width: parent.width width: parent.width
anchors.fill: parent anchors.fill: parent
anchors.topMargin: parent.height * 0.02 anchors.topMargin: parent.height * 0.02
anchors.bottomMargin: parent.height * 0.02 anchors.bottomMargin: parent.height * 0.02
onSpacingChanged: console.log(parent.width)
Label { Label {
id: heading id: heading
font.pixelSize: parent.width * 0.075 font.pixelSize: parent.width * 0.075
@ -27,6 +25,13 @@ Page {
Layout.rightMargin: parent.width * 0.5 - width * 0.5 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 { TextField {
id: tickInterval id: tickInterval
@ -40,10 +45,17 @@ Page {
Keys.onReturnPressed: root.start() Keys.onReturnPressed: root.start()
} }
Label {
id: numCountInfo
text: "Summands:"
font.pixelSize: parent.height * 0.05
Layout.leftMargin: parent.width * 0.05
}
TextField { TextField {
id: numCount id: numCount
text: calculator.numCount text: calculator.numCount
placeholderText: "numbercount" placeholderText: "summands"
validator: IntValidator {bottom: 1; top: 100000;} validator: IntValidator {bottom: 1; top: 100000;}
horizontalAlignment: Qt.AlignHCenter horizontalAlignment: Qt.AlignHCenter
Layout.fillWidth: true Layout.fillWidth: true
@ -52,10 +64,17 @@ Page {
Keys.onReturnPressed: root.start() Keys.onReturnPressed: root.start()
} }
Label {
id: minInfo
text: "Minimum:"
font.pixelSize: parent.height * 0.05
Layout.leftMargin: parent.width * 0.05
}
TextField { TextField {
id: min id: min
text: calculator.min text: calculator.min
placeholderText: "min" placeholderText: "minimum"
validator: IntValidator {bottom: -100000; top: 100000;} validator: IntValidator {bottom: -100000; top: 100000;}
horizontalAlignment: Qt.AlignHCenter horizontalAlignment: Qt.AlignHCenter
Layout.fillWidth: true Layout.fillWidth: true
@ -64,10 +83,17 @@ Page {
Keys.onReturnPressed: root.start() Keys.onReturnPressed: root.start()
} }
Label {
id: maxInfo
text: "Maximum:"
font.pixelSize: parent.height * 0.05
Layout.leftMargin: parent.width * 0.05
}
TextField { TextField {
id: max id: max
text: calculator.max text: calculator.max
placeholderText: "max" placeholderText: "maximum"
validator: IntValidator {bottom: -100000; top: 100000;} validator: IntValidator {bottom: -100000; top: 100000;}
horizontalAlignment: Qt.AlignHCenter horizontalAlignment: Qt.AlignHCenter
Layout.fillWidth: true Layout.fillWidth: true