From 9079badfdbc77731d7bbb67cc540f8bb1788b7df Mon Sep 17 00:00:00 2001 From: f321x Date: Fri, 17 Apr 2026 11:46:39 +0200 Subject: [PATCH 1/2] qml: add default topPadding to ElTextArea I noticed all ElTextAreas seem to look better with some topPadding, so it makes more sense to add it as default to ElTextArea. Followup to https://github.com/spesmilo/electrum/pull/10579 --- electrum/gui/qml/components/NostrConfigDialog.qml | 1 - electrum/gui/qml/components/controls/ElTextArea.qml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/gui/qml/components/NostrConfigDialog.qml b/electrum/gui/qml/components/NostrConfigDialog.qml index 0eb6cfd86..384555f5b 100644 --- a/electrum/gui/qml/components/NostrConfigDialog.qml +++ b/electrum/gui/qml/components/NostrConfigDialog.qml @@ -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 diff --git a/electrum/gui/qml/components/controls/ElTextArea.qml b/electrum/gui/qml/components/controls/ElTextArea.qml index e161979d2..f3c55d30d 100644 --- a/electrum/gui/qml/components/controls/ElTextArea.qml +++ b/electrum/gui/qml/components/controls/ElTextArea.qml @@ -49,6 +49,7 @@ 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 From 6872637053a22b392d326e83b479f32b2a6e95c1 Mon Sep 17 00:00:00 2001 From: f321x Date: Fri, 17 Apr 2026 11:59:34 +0200 Subject: [PATCH 2/2] qml: ElTextArea: hide placeholder text on user input When the user enters something into the ElTextArea the placeholder text should be hidden so it doesn't conflict with the user input. This affects e.g. the lnurl pay dialog. --- electrum/gui/qml/components/controls/ElTextArea.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qml/components/controls/ElTextArea.qml b/electrum/gui/qml/components/controls/ElTextArea.qml index f3c55d30d..1d69e04f5 100644 --- a/electrum/gui/qml/components/controls/ElTextArea.qml +++ b/electrum/gui/qml/components/controls/ElTextArea.qml @@ -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 @@ -55,6 +55,7 @@ Flickable { width: parent.width focus: true wrapMode: TextEdit.Wrap + placeholderText: edit.text.length ? "" : root.placeholderText onCursorRectangleChanged: root.ensureVisible(cursorRectangle) onTextChanged: root.textChanged() background: Rectangle {