Merge pull request #10585 from f321x/qml_eltextarea_padding

qml: ElTextArea default topPadding, hide placeholderText on input
This commit is contained in:
ghost43
2026-04-27 17:55:10 +00:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
@@ -74,7 +74,6 @@ ElDialog {
Layout.fillWidth: true
Layout.fillHeight: true
font.family: FixedFont
topPadding: constants.paddingLarge
wrapMode: TextEdit.WrapAnywhere
onTextChanged: valid = verify(text)
inputMethodHints: Qt.ImhSensitiveData | Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase
@@ -17,7 +17,7 @@ Flickable {
property alias background: rootpane.background
property alias font: edit.font
property alias inputMethodHints: edit.inputMethodHints
property alias placeholderText: edit.placeholderText
property string placeholderText
property alias color: edit.color
property alias topPadding: rootpane.topPadding
readonly property bool anyActiveFocus: activeFocus || edit.activeFocus
@@ -49,11 +49,13 @@ Flickable {
width: root.width
height: Math.max(root.height, edit.height + topPadding + bottomPadding)
padding: constants.paddingXSmall
topPadding: constants.paddingLarge
TextArea {
id: edit
width: parent.width
focus: true
wrapMode: TextEdit.Wrap
placeholderText: edit.text.length ? "" : root.placeholderText
onCursorRectangleChanged: root.ensureVisible(cursorRectangle)
onTextChanged: root.textChanged()
background: Rectangle {