From 1bac3dc32fcfbbc706b80203da54c30fe1c3cace Mon Sep 17 00:00:00 2001 From: "vladimir.kuznetsov" Date: Thu, 19 Dec 2024 13:10:32 +0700 Subject: [PATCH] chore: changed textarea to textfield --- .../ui/qml/DefaultVpn/Controls/InputType.qml | 56 +++++++++---------- 1 file changed, 27 insertions(+), 29 deletions(-) diff --git a/client/ui/qml/DefaultVpn/Controls/InputType.qml b/client/ui/qml/DefaultVpn/Controls/InputType.qml index 9e447b06..5670a7db 100644 --- a/client/ui/qml/DefaultVpn/Controls/InputType.qml +++ b/client/ui/qml/DefaultVpn/Controls/InputType.qml @@ -9,7 +9,7 @@ import Config 1.0 import "TextTypes" -ScrollView { +TextField { id: root property string defaultBackgroundColor: Style.color.white @@ -24,35 +24,33 @@ ScrollView { property string disabledBorderColor: Style.color.gray3 property string disabledTextColor: Style.color.gray9 - property string placeholderText - TextArea { - color: root.enabled ? root.defaultTextColor : (root.hovered || root.pressed) ? root.hoveredTextColor : root.disabledTextColor - background: Rectangle { - anchors.fill: parent + color: root.enabled ? root.defaultTextColor : (root.hovered || root.pressed) ? root.hoveredTextColor : root.disabledTextColor + background: Rectangle { + anchors.fill: parent - color: root.enabled ? root.defaultBackgroundColor : (root.hovered || root.pressed) ? root.hoveredBackgroundColor : root.disabledBackgroundColor - border.color: root.enabled ? root.defaultBorderColor : (root.hovered || root.pressed) ? root.hoveredBorderColor : root.disabledBorderColor - border.width: 1 - radius: 6 - } - - topPadding: 12 - bottomPadding: 12 - leftPadding: 16 - rightPadding: 16 - - inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText - - selectionColor: Style.color.accent1 - selectedTextColor: Style.color.white - - font.pixelSize: 17 - font.weight: 400 - font.family: Style.font - - wrapMode: TextEdit.Wrap - - placeholderText: root.placeholderText + color: root.enabled ? root.defaultBackgroundColor : (root.hovered || root.pressed) ? root.hoveredBackgroundColor : root.disabledBackgroundColor + border.color: root.enabled ? root.defaultBorderColor : (root.hovered || root.pressed) ? root.hoveredBorderColor : root.disabledBorderColor + border.width: 1 + radius: 6 } + + topPadding: 12 + bottomPadding: 12 + leftPadding: 16 + rightPadding: 16 + + inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhSensitiveData | Qt.ImhNoPredictiveText + + selectionColor: Style.color.accent1 + selectedTextColor: Style.color.white + + font.pixelSize: 17 + font.weight: 400 + font.family: Style.font + + wrapMode: TextEdit.Wrap + + verticalAlignment: Text.AlignTop + }