Index: sources/gui/qml/pages/settings/SettingsDateTime.qml =================================================================== diff -u -r65558208e4968de9a5470ff5fda1ee2a9d00c793 -r7077e38c74db9cccb5496ffefcf8936c0916de76 --- sources/gui/qml/pages/settings/SettingsDateTime.qml (.../SettingsDateTime.qml) (revision 65558208e4968de9a5470ff5fda1ee2a9d00c793) +++ sources/gui/qml/pages/settings/SettingsDateTime.qml (.../SettingsDateTime.qml) (revision 7077e38c74db9cccb5496ffefcf8936c0916de76) @@ -30,17 +30,19 @@ SettingsBase { id: _root property int labelWidth : 275 + property int entryWidth : 100 + readonly property bool isValid : _year .textInput.acceptableInput && _month .textInput.acceptableInput && _day .textInput.acceptableInput && _hours .textInput.acceptableInput && _minutes.textInput.acceptableInput - confirmEnabled: isValid - + confirmEnabled : isValid + firstFocusInput : _hours notificationText: vDateTime.status - onConfirmClicked: { + onConfirmClicked: { vDateTime.doConfirm( _year .textInput.text , _month .textInput.text , @@ -72,99 +74,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) - } - } } } }