Index: sources/gui/qml/components/TextEntry.qml =================================================================== diff -u -rf7392d985121b21e9f9814e444b0810cd1d00b18 -r840b91f4f72d599bb523050dda2183a6611017b5 --- sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision f7392d985121b21e9f9814e444b0810cd1d00b18) +++ sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision 840b91f4f72d599bb523050dda2183a6611017b5) @@ -33,12 +33,21 @@ property alias labelText : _label.text property alias validator : _input.validator property alias labelVisible : _label.visible + property var nextInput : undefined signal enterPressed() width : TextEntry.TextInputWidth height : TextEntry.TextInputHeight + onEnterPressed : { + if (nextInput) { + if (textInput.acceptableInput) { + nextInput.textInput.focus = true + } + } + } + Text { id: _label anchors { left: parent.left @@ -58,7 +67,7 @@ font.pixelSize: Fonts.fontPixelTextRectExtra selectionColor: Colors.borderButtonHalfDarker height: parent.height - width: Variables.textInputLineWidth + width: TextEntry.TextInputLineWidth horizontalAlignment: TextInput.AlignHCenter inputMethodHints: Qt.ImhDigitsOnly selectedTextColor: acceptableInput ? Colors.textMain : Colors.red @@ -77,7 +86,7 @@ Line { id: _line color: Colors.borderButtonHalfDarker - width: Variables.textInputLineWidth + width: TextEntry.TextInputLineWidth anchors { top: _input.bottom left: _input.left Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r5e3b27057e9c7dedf9c46e3881609b7e96c3fb71 -r840b91f4f72d599bb523050dda2183a6611017b5 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 5e3b27057e9c7dedf9c46e3881609b7e96c3fb71) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 840b91f4f72d599bb523050dda2183a6611017b5) @@ -36,6 +36,7 @@ readonly property int mainMenuHeight : 70 readonly property int minVGap : 15 + readonly property int minVGap2 : 30 readonly property int logoWidth : 50 readonly property int logoHeight : 50 @@ -138,33 +139,9 @@ readonly property int settingsNotificationMargin : 10 - readonly property int settingsBLEListViewWidth : 360 - readonly property int settingsBLEItemRightMargin : 20 - readonly property int settingsBLEButtonWidth : settingsButtonWidth - readonly property int settingsBLEButtonHeight : settingsButtonHeight - readonly property int settingsBLEMargin : settingsMargin - readonly property int settingsBLEListViewMargin : 25 readonly property int settingsOptionWidth : 550 readonly property int settingsOptionHeight : 50 - readonly property int settingsWIFIButtonWidth : settingsButtonWidth - readonly property int settingsWIFIButtonHeight : settingsButtonHeight - readonly property int settingsWIFIMargin : settingsMargin - readonly property int settingsWIFIInputWidth : settingsInputWidth - readonly property int settingsWIFISpacing : settingsSpacing - readonly property int settingsWIFINetworkHeight : 85 - readonly property int settingsWIFINetworkWidth : 375 - readonly property int settingsWIFINetworksWidth : settingsWIFINetworkWidth + 50 - readonly property int settingsWIFIBottomMargin : 15 - - readonly property int textInputWidth : 350 - readonly property int textInputHeight : 50 - readonly property int textInputLineWidth : 100 - - readonly property int settingsDateTimeSetMargin : settingsMargin - readonly property int settingsDateTimeSetSpacing : settingsSpacing - readonly property int settingsDateTimeSetInputWidth : settingsInputWidth - // ---------- < PRS > Related Section ---------- // Min/Max readonly property int bloodFlowMin : 100 Index: sources/gui/qml/pages/settings/SettingsDateTime.qml =================================================================== diff -u -re8ffaa51e4eb9b55efebebc13899f79d9a5ca946 -r840b91f4f72d599bb523050dda2183a6611017b5 --- sources/gui/qml/pages/settings/SettingsDateTime.qml (.../SettingsDateTime.qml) (revision e8ffaa51e4eb9b55efebebc13899f79d9a5ca946) +++ sources/gui/qml/pages/settings/SettingsDateTime.qml (.../SettingsDateTime.qml) (revision 840b91f4f72d599bb523050dda2183a6611017b5) @@ -35,6 +35,8 @@ } property int labelWidth : 275 + property int entryWidth : 100 + readonly property bool isValid : _year .textInput.acceptableInput && _month .textInput.acceptableInput && @@ -77,99 +79,80 @@ font.pixelSize: Fonts.fontPixelTextRectExtra } - TextEntry { id: _hours - label.visible: false - width: Variables.textInputLineWidth - validator : IntValidator{ - bottom : 0 - top : 24 + TextEntry { id : _hours + nextInput : _minutes + label.visible : false + width : entryWidth + validator : IntValidator { + bottom : 0 + top : 24 } - onEnterPressed: { - if (textInput.acceptableInput) { - _minutes.textInput.forceActiveFocus() - } - } } - Text { id: _colon - text: qsTr(":") - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTextRectExtra + Text { id : _colon + text : qsTr(":") + color : Colors.textMain + font.pixelSize : Fonts.fontPixelTextRectExtra } - TextEntry { id: _minutes - label.visible: false - validator : IntValidator{ - bottom : 0 - top : 59 + TextEntry { id : _minutes + nextInput : _month + label.visible : false + width : entryWidth + validator : IntValidator { + bottom : 0 + top : 59 } - onEnterPressed: { - if (textInput.acceptableInput) { - _month.textInput.forceActiveFocus() - } - } } } Row { // date spacing: 5 - Text { id: _dateLabel - width: labelWidth - text: qsTr("Date (MM/DD/YYYY)") - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTextRectExtra + Text { id : _dateLabel + width : labelWidth + text : qsTr("Date (MM/DD/YYYY)") + color : Colors.textMain + font.pixelSize : Fonts.fontPixelTextRectExtra } - TextEntry { id: _month - label.visible: false - width: Variables.textInputLineWidth - validator : IntValidator{ - bottom : 1 - top : 12 + TextEntry { id : _month + nextInput : _day + label.visible : false + width : entryWidth + validator : IntValidator { + bottom : 1 + top : 12 } - onEnterPressed: { - if (textInput.acceptableInput) { - _day.textInput.forceActiveFocus() - } - } } - Text { id: _slashMonthDay - text: qsTr("/") - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTextRectExtra + Text { id : _slashMonthDay + text : qsTr("/") + color : Colors.textMain + font.pixelSize : Fonts.fontPixelTextRectExtra } - TextEntry { id: _day - label.visible: false - width: Variables.textInputLineWidth - validator : IntValidator{ - bottom : 1 - top : 31 + TextEntry { id : _day + nextInput : _year + label.visible : false + width : entryWidth + validator : IntValidator { + bottom : 1 + top : 31 } - onEnterPressed: { - if (textInput.acceptableInput) { - _year.textInput.forceActiveFocus() - } - } } - Text { id: _slashDayYear - text: qsTr("/") - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTextRectExtra + Text { id : _slashDayYear + text : qsTr("/") + color : Colors.textMain + font.pixelSize : Fonts.fontPixelTextRectExtra } - TextEntry { id: _year - label.visible: false - validator : IntValidator { - bottom : 1970 + TextEntry { id : _year + label.visible : false + width : entryWidth + validator : IntValidator { + bottom : 1970 } - onEnterPressed: { - if (textInput.acceptableInput) { - _keyboard.setVisible(true) - } - } } } }