Index: sources/gui/qml/pages/settings/SettingsDateTime.qml =================================================================== diff -u -r3d5bd682a4dc4bd36e26ca17067bafd489fa970b -r3738eb975493a36efae6b1a060624abab72c6871 --- sources/gui/qml/pages/settings/SettingsDateTime.qml (.../SettingsDateTime.qml) (revision 3d5bd682a4dc4bd36e26ca17067bafd489fa970b) +++ sources/gui/qml/pages/settings/SettingsDateTime.qml (.../SettingsDateTime.qml) (revision 3738eb975493a36efae6b1a060624abab72c6871) @@ -41,16 +41,18 @@ _hours .textInput.acceptableInput && _minutes.textInput.acceptableInput + readonly property color entryTextColor : _ntpSwitch.checked ? Colors.borderDisableButton : Colors.textMain + confirmEnabled : isValid - firstFocusInput : _hours notificationText: vDateTime.status onConfirmClicked: { vDateTime.doConfirm( _year .textInput.text , _month .textInput.text , _day .textInput.text , _hours .textInput.text , - _minutes.textInput.text ) + _minutes.textInput.text , + _ntpSwitch.checked ) } onVisibleChanged: { // it seems entering in the TextInput by keyboard breaks the binding @@ -64,12 +66,26 @@ contentItem: Column { id: _container spacing : 25 + LabelUnitContainer { id: _ntpSettings + anchors.horizontalCenter : parent.horizontalCenter + width : Variables.adjustmentLabelUnitContainerWidth + height : Variables.adjustmentLabelUnitContainerHeight + unitText : qsTr("Network Time Protocol") + text : qsTr("NTP") + contentArea.anchors.leftMargin : width * 0.75 + + contentItem: BaseSwitch { id: _ntpSwitch + checked : vDateTime.ntp + } + } + LabelUnitContainer { id: _timeContainer anchors.horizontalCenter : parent.horizontalCenter width : Variables.adjustmentLabelUnitContainerWidth height : Variables.adjustmentLabelUnitContainerHeight text : qsTr("Time") unitText : qsTr("HH:MM") + enabled : ! _ntpSwitch.checked contentItem: Row { // time spacing : 10 @@ -80,6 +96,7 @@ line.visible : false width : entryWidth showPlaceHolderText : true + showDisabledColor : true validator : IntValidator { bottom : 0 top : 23 @@ -89,6 +106,7 @@ Label { text : qsTr(":") + color : _root.entryTextColor width : 10 } @@ -97,6 +115,7 @@ line.visible : false width : entryWidth showPlaceHolderText : true + showDisabledColor : true validator : IntValidator { bottom : 0 top : 59 @@ -112,6 +131,7 @@ height : Variables.adjustmentLabelUnitContainerHeight text : qsTr("Date") unitText : qsTr("MM/DD/YYYY") + enabled : ! _ntpSwitch.checked contentItem: Row { // time spacing : 10 @@ -122,6 +142,7 @@ line.visible : false width : entryWidth showPlaceHolderText : true + showDisabledColor : true validator : IntValidator { bottom : 1 top : 12 @@ -131,14 +152,16 @@ Label { id : _slashMonthDay text : qsTr(":") - width : 10 + color : _root.entryTextColor + width : 5 } TextEntry { id: _day nextInput : _year line.visible : false width : entryWidth showPlaceHolderText : true + showDisabledColor : true validator : IntValidator { bottom : 1 top : 31 @@ -148,13 +171,15 @@ Label { id : _slashDayYear text : qsTr(":") - width : 10 + color : _root.entryTextColor + width : 5 } TextEntry { id: _year line.visible : false width : entryWidth showPlaceHolderText : true + showDisabledColor : true validator : IntValidator { bottom : 1970 top : 2100 // seems date command is not accepting more than 2100