Index: sources/gui/qml/components/TextEntry.qml =================================================================== diff -u -re1c1417fadbcc7e72064fd806f2e117e5d3ce228 -r6c6f1f5d466badd9b4fd67be7c907234c342b2a2 --- sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision e1c1417fadbcc7e72064fd806f2e117e5d3ce228) +++ sources/gui/qml/components/TextEntry.qml (.../TextEntry.qml) (revision 6c6f1f5d466badd9b4fd67be7c907234c342b2a2) @@ -7,7 +7,7 @@ * * \file TextEntry.qml * \author (last) Behrouz NematiPour - * \date (last) 02-Apr-2023 + * \date (last) 14-Apr-2023 * \author (original) Behrouz NematiPour * \date (original) 16-Apr-2021 * @@ -30,6 +30,7 @@ property alias textInput : _input property alias line : _line property alias label : _label + property alias separator : _separator property alias validator : _input.validator property var nextInput : undefined property alias text : _input.text @@ -53,12 +54,13 @@ function doFocus( vFocus ) { if ( vFocus ) { - //TODO: Not sure why if there is no cursor all should be selected, - // tested and couln't find anything, disabled for now. - // was causeing on disabling the WiFi Static IP entry. - // if ( ! _root.hasCursor ) { - // _input.selectAll() - // } + // if has cursor (is editable), by clicking on the entry the keyboard shall pop up + // since the MouseArea is covering the entry, user can't move the cursur to delete one specific character, + // all will be selected to overwrite the entire text for easy modification. + // it was better if the keyboard has the cursor arrows + if ( _root.hasCursor ) { + _input.selectAll() + } _keyboard.setVisible(true) } } @@ -71,6 +73,18 @@ font.pixelSize : Fonts.fontPixelTextRectExtra } + Text { id : _separator + visible : text + width : 0 + text : "" + height : parent.height + anchors.left : _label.right + anchors.top : parent.top + color : Colors.textMain + font.pixelSize : Fonts.fontPixelTextRectExtra + horizontalAlignment: Text.AlignLeft + } + TextInput { id : _input enabled : hasCursor height : parent.height @@ -80,7 +94,7 @@ color : acceptableInput ? Colors.textMain : Colors.red selectionColor : Colors.borderButtonHalfDarker selectedTextColor : acceptableInput ? Colors.textMain : Colors.red - anchors.left : _label.right + anchors.left : _separator.right horizontalAlignment : TextInput.AlignHCenter inputMethodHints : Qt.ImhDigitsOnly selectByMouse : true @@ -99,7 +113,10 @@ } MouseArea { - visible : ! hasCursor + // if it has cursor since it is possible to have only one entry. + // then just click on the entry will not do anything and we need a mouse area to display the keyboard + // if in any case the keyboard becomes hidden to make the rest of the screen visible. + visible : hasCursor anchors.fill: parent propagateComposedEvents: true onClicked: {