Index: sources/gui/qml/dialogs/VitalsEntry.qml =================================================================== diff -u -r4f572cf1b77d6188ed9bd859f6767b0daab159b3 -r510ea07f96362a18f9961f41b5b91740df075c1f --- sources/gui/qml/dialogs/VitalsEntry.qml (.../VitalsEntry.qml) (revision 4f572cf1b77d6188ed9bd859f6767b0daab159b3) +++ sources/gui/qml/dialogs/VitalsEntry.qml (.../VitalsEntry.qml) (revision 510ea07f96362a18f9961f41b5b91740df075c1f) @@ -15,7 +15,6 @@ // Qt import QtQuick 2.12 -import QtQuick.Controls 2.12 // Project // Qml imports @@ -30,77 +29,75 @@ contentItem.objectName: "VitalsEntryContent" modal: false - Rectangle { id: _titleBar; - color: "transparent"; - height: _root.height / 4; - width: _root.width; - radius: _root.radius; + Item { id: _titleBar + height: _root.height / 4 + width: _root.width Text { id: _titleBarText color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle text: qsTr("Blood Pressure / HR Entry") - anchors.centerIn: _titleBar; + anchors.centerIn: _titleBar } } - DenaliTextInput { id: _systolic + TextEntry { id: _systolic anchors { top: _titleBar.bottom left: parent.left leftMargin: Variables.vitalsLeftMargin } validator: IntValidator{ - bottom: Variables.vitalsEntryMin - top: Variables.vitalsEntryMax + bottom: Variables.vitalsEntrySystolicMin + top: Variables.vitalsEntrySystolicMax } labelText: qsTr("Systolic: ") - onPressedEnter: { + onEnterPressed: { _diastolic.textInput.focus = true } } - DenaliTextInput { id: _diastolic + TextEntry { id: _diastolic anchors { top: _titleBar.bottom left: _systolic.right } validator: IntValidator{ - bottom: Variables.vitalsEntryMin - top: Variables.vitalsEntryMax + bottom: Variables.vitalsEntryDiastolicMin + top: Variables.vitalsEntryDiastolicMax } labelText: qsTr("Diastolic: ") - onPressedEnter: { + onEnterPressed: { _pulse.textInput.focus = true } } - DenaliTextInput { id: _pulse + TextEntry { id: _pulse anchors { top: _titleBar.bottom left: _diastolic.right } validator: IntValidator{ - bottom: Variables.vitalsEntryMin - top: Variables.vitalsEntryMax + bottom: Variables.vitalsEntryPulseBPMMin + top: Variables.vitalsEntryPulseBPMMax } labelText: qsTr("Heart Rate (BPM): ") - onPressedEnter: { + onEnterPressed: { _keyboard.setVisible(false) } } Row { id: _buttons - spacing: Variables.buttonSpacing; + spacing: Variables.buttonSpacing anchors { - horizontalCenter: parent.horizontalCenter; - bottom: parent.bottom; - bottomMargin: Variables.dialogMargin / 2; + horizontalCenter: parent.horizontalCenter + bottom: parent.bottom + bottomMargin: Variables.dialogMargin / 2 } TouchRect { id: _confirm objectName: "_VitalsEntryConfirm" - width: _root.width / 3; + width: _root.width / 3 text.text: qsTr("CONFIRM") button.onPressed: { if (!disabled) { @@ -110,14 +107,15 @@ close() } } - disabled: (_systolic.textInput.text === "") || - (_diastolic.textInput.text === "") || - (_pulse.textInput.text === "") + + disabled: (!_systolic.textInput.acceptableInput || + !_diastolic.textInput.acceptableInput || + !_pulse.textInput.acceptableInput) } TouchRect { id: _cancel objectName: "_VitalsEntryCancel" - width: _root.width / 3; + width: _root.width / 3 text.text: qsTr("CANCEL") button.onPressed: { close()