diff --git a/src/FactSystem/FactControls/FactTextField.qml b/src/FactSystem/FactControls/FactTextField.qml index ac3b601b924d8d18f92a8ad788cff1bae382a61a..f4afbe8d357f289df5292867de85f50869eef9a4 100644 --- a/src/FactSystem/FactControls/FactTextField.qml +++ b/src/FactSystem/FactControls/FactTextField.qml @@ -14,8 +14,11 @@ QGCTextField { property Fact fact: null property string _validateString - text: fact.valueString - unitsLabel: fact.units + text: fact.valueString + unitsLabel: fact.units + + // At this point all Facts are numeric + inputMethodHints: Qt.ImhFormattedNumbersOnly onEditingFinished: { if (qgcView) { diff --git a/src/QmlControls/ParameterEditorDialog.qml b/src/QmlControls/ParameterEditorDialog.qml index 8834f0a39fd486ab82839d768250298c949648d7..25d688b0e376928581ce4a78019ad4b1d9a64339 100644 --- a/src/QmlControls/ParameterEditorDialog.qml +++ b/src/QmlControls/ParameterEditorDialog.qml @@ -84,6 +84,9 @@ QGCViewDialog { id: valueField text: validate ? validateValue : fact.valueString + // At this point all Facts are numeric + inputMethodHints: Qt.ImhFormattedNumbersOnly + onAccepted: accept() Keys.onReleased: { diff --git a/src/QmlControls/QGCViewDialog.qml b/src/QmlControls/QGCViewDialog.qml index 24a6da7b9925c6f1e7f923f2030ebfaa9586ffef..81cabcba2cad8032d7e9fd2120444d1bf3bad932 100644 --- a/src/QmlControls/QGCViewDialog.qml +++ b/src/QmlControls/QGCViewDialog.qml @@ -39,10 +39,12 @@ FactPanel { signal hideDialog function accept() { + Qt.inputMethod.hide() hideDialog() } function reject() { + Qt.inputMethod.hide() hideDialog() } diff --git a/src/QmlControls/ScreenTools.qml b/src/QmlControls/ScreenTools.qml index 79a9a71a6b5101b16bf06fb5f86f6ca204ef4f0e..1b9ecc80dc10e18c45a585b85a3f28953fbcc639 100644 --- a/src/QmlControls/ScreenTools.qml +++ b/src/QmlControls/ScreenTools.qml @@ -15,8 +15,8 @@ Item { // On OSX ElCapitan with Qt 5.4.0 any font pixel size above 19 shows garbage test. No idea why at this point. // Will remove Math.min when problem is figure out. - readonly property real mediumFontPixelSize: Math.min(defaultFontPixelSize * ScreenToolsController.mediumFontPixelSizeRatio, 19) - readonly property real largeFontPixelSize: Math.min(defaultFontPixelSize * ScreenToolsController.largeFontPixelSizeRatio, 19) + readonly property real mediumFontPixelSize: Math.min(defaultFontPixelSize * ScreenToolsController.mediumFontPixelSizeRatio, ScreenToolsController.isMobile ? 10000 : 19) + readonly property real largeFontPixelSize: Math.min(defaultFontPixelSize * ScreenToolsController.largeFontPixelSizeRatio, ScreenToolsController.isMobile ? 10000 : 19) property bool isAndroid: ScreenToolsController.isAndroid property bool isiOS: ScreenToolsController.isiOS