Skip to content

Commit 044c00a

Browse files
authored
Merge pull request #10585 from f321x/qml_eltextarea_padding
qml: ElTextArea default topPadding, hide placeholderText on input
2 parents f60cdb0 + 6872637 commit 044c00a

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

electrum/gui/qml/components/NostrConfigDialog.qml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ ElDialog {
7474
Layout.fillWidth: true
7575
Layout.fillHeight: true
7676
font.family: FixedFont
77-
topPadding: constants.paddingLarge
7877
wrapMode: TextEdit.WrapAnywhere
7978
onTextChanged: valid = verify(text)
8079
inputMethodHints: Qt.ImhSensitiveData | Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase

electrum/gui/qml/components/controls/ElTextArea.qml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Flickable {
1717
property alias background: rootpane.background
1818
property alias font: edit.font
1919
property alias inputMethodHints: edit.inputMethodHints
20-
property alias placeholderText: edit.placeholderText
20+
property string placeholderText
2121
property alias color: edit.color
2222
property alias topPadding: rootpane.topPadding
2323
readonly property bool anyActiveFocus: activeFocus || edit.activeFocus
@@ -49,11 +49,13 @@ Flickable {
4949
width: root.width
5050
height: Math.max(root.height, edit.height + topPadding + bottomPadding)
5151
padding: constants.paddingXSmall
52+
topPadding: constants.paddingLarge
5253
TextArea {
5354
id: edit
5455
width: parent.width
5556
focus: true
5657
wrapMode: TextEdit.Wrap
58+
placeholderText: edit.text.length ? "" : root.placeholderText
5759
onCursorRectangleChanged: root.ensureVisible(cursorRectangle)
5860
onTextChanged: root.textChanged()
5961
background: Rectangle {

0 commit comments

Comments
 (0)