Index: sources/gui/qml/components/TextEntry.qml =================================================================== diff -u -r16a8f25568b4636ebc31e76c86a8031940cc4ad7 -rd14136d218b5dbc0734f7949b30541d242bcd350 --- sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision 16a8f25568b4636ebc31e76c86a8031940cc4ad7) +++ sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision d14136d218b5dbc0734f7949b30541d242bcd350) @@ -36,6 +36,9 @@ property alias text : _input.text property bool hasCursor : true property alias lengthMax : _input.maximumLength + property bool useQtNumPad : true + property bool showPlaceHolderText: false + property bool showDisabledColor :false // only show greyed text if allowed. readonly property alias isValid : _input.acceptableInput @@ -63,7 +66,10 @@ if ( _root.hasCursor ) { _input.selectAll() } - _keyboard.setVisible(true) + + if (useQtNumPad) { + _keyboard.setVisible(true) + } } else { editingFinished() @@ -96,7 +102,9 @@ width : TextEntry.InputWidth text : "" font.pixelSize : Fonts.fontPixelTextRectExtra - color : acceptableInput ? Colors.textMain : Colors.red + color : _root.showDisabledColor && ! enabled ? Colors.borderDisableButton : + acceptableInput ? Colors.textMain : + Colors.red selectionColor : Colors.borderButtonHalfDarker selectedTextColor : acceptableInput ? Colors.textMain : Colors.red anchors.left : _separator.right @@ -108,6 +116,17 @@ onFocusChanged : doFocus(focus) } + Text { id: _placeHolderText + text : Variables.emptyEntry + anchors.centerIn : _input + horizontalAlignment : Text.AlignRight + font.pixelSize : Fonts.fontPixelValueControl + color : Colors.offWhite + visible : _input.text.length === 0 && + ! _input.activeFocus && + _root.showPlaceHolderText + } + Line { id : _line visible : hasCursor color : Colors.borderButtonHalfDarker