What changed, and why it matters
This commit is a purely cosmetic restyling of a user-interface dialog in Electrum's mobile/QML app. It rearranges the text box, buttons, and labels used when opening a Lightning payment channel, but does not change any security logic, validation, or data handling.
No security action needed; this is a UI styling change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies electrum/gui/qml/components/OpenChannelDialog.qml. It renames the node TextArea id from ‘node’ to ‘nodeUri’, wraps the node URI input and its paste/scan buttons in a RowLayout, removes two standalone Label elements, adjusts margins and font metrics, and adds a FontMetrics helper. The underlying channelopener.connectStr binding, validateConnectString() calls, inputMethodHints, and onTextChanged/onActiveFocusChanged handlers remain functionally identical.
Changed components
electrum/gui/qml/components/OpenChannelDialog.qmlInspect captured patch +64 / −66
diff --git a/electrum/gui/qml/components/OpenChannelDialog.qml b/electrum/gui/qml/components/OpenChannelDialog.qml
index 99aa6cd..6282c54 100644
--- a/electrum/gui/qml/components/OpenChannelDialog.qml
+++ b/electrum/gui/qml/components/OpenChannelDialog.qml
@@ -67,76 +67,75 @@ ElDialog {
].join(' ')
}
- Label {
- text: qsTr('Node')
- Layout.columnSpan: 3
- color: Material.accentColor
- }
-
// gossip
- TextArea {
- id: node
- visible: Config.useGossip
- Layout.columnSpan: 2
- Layout.fillWidth: true
- font.family: FixedFont
- wrapMode: Text.Wrap
- placeholderText: qsTr('Paste or scan node uri/pubkey')
- inputMethodHints: Qt.ImhSensitiveData | Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase
- onTextChanged: {
- if (activeFocus)
- channelopener.connectStr = text
- }
- onActiveFocusChanged: {
- if (!activeFocus)
- channelopener.connectStr = text
- }
- }
-
RowLayout {
+ Layout.columnSpan: 3
visible: Config.useGossip
spacing: 0
- ToolButton {
- icon.source: '../../icons/paste.png'
- icon.height: constants.iconSizeMedium
- icon.width: constants.iconSizeMedium
- onClicked: {
- var cliptext = AppController.clipboardToText()
- if (!cliptext)
- return
- if (channelopener.validateConnectString(cliptext)) {
- channelopener.connectStr = cliptext
- node.text = channelopener.connectStr
- } else {
- var dialog = app.messageDialog.createObject(app, {
- text: qsTr('Invalid node-id or connect string')
- })
- dialog.open()
- }
+
+ TextArea {
+ id: nodeUri
+ visible: Config.useGossip
+ Layout.fillWidth: true
+ Layout.minimumHeight: nodeUriFontMetrics.lineSpacing * 4 + topPadding + bottomPadding
+ Layout.topMargin: constants.paddingSmall
+ font.family: FixedFont
+ wrapMode: Text.Wrap
+ placeholderText: qsTr('Paste or scan node uri/pubkey')
+ inputMethodHints: Qt.ImhSensitiveData | Qt.ImhNoPredictiveText | Qt.ImhNoAutoUppercase
+ onTextChanged: {
+ if (activeFocus)
+ channelopener.connectStr = text
+ }
+ onActiveFocusChanged: {
+ if (!activeFocus)
+ channelopener.connectStr = text
}
}
- ToolButton {
- icon.source: '../../icons/qrcode.png'
- icon.height: constants.iconSizeMedium
- icon.width: constants.iconSizeMedium
- scale: 1.2
- onClicked: {
- var dialog = app.scanDialog.createObject(app, {
- hint: qsTr('Scan a node-id or a connect string')
- })
- dialog.onFoundText.connect(function(data) {
- if (channelopener.validateConnectString(data)) {
- channelopener.connectStr = data
- node.text = channelopener.connectStr
+ ColumnLayout {
+ spacing: 0
+ ToolButton {
+ icon.source: '../../icons/paste.png'
+ icon.height: constants.iconSizeMedium
+ icon.width: constants.iconSizeMedium
+ onClicked: {
+ var cliptext = AppController.clipboardToText()
+ if (!cliptext)
+ return
+ if (channelopener.validateConnectString(cliptext)) {
+ channelopener.connectStr = cliptext
+ nodeUri.text = channelopener.connectStr
} else {
- var errdialog = app.messageDialog.createObject(app, {
+ var dialog = app.messageDialog.createObject(app, {
text: qsTr('Invalid node-id or connect string')
})
- errdialog.open()
+ dialog.open()
}
- dialog.close()
- })
- dialog.open()
+ }
+ }
+ ToolButton {
+ icon.source: '../../icons/qrcode.png'
+ icon.height: constants.iconSizeMedium
+ icon.width: constants.iconSizeMedium
+ scale: 1.2
+ onClicked: {
+ var dialog = app.scanDialog.createObject(app, {
+ hint: qsTr('Scan a node-id or a connect string')
+ })
+ dialog.onFoundText.connect(function(data) {
+ if (channelopener.validateConnectString(data)) {
+ channelopener.connectStr = data
+ nodeUri.text = channelopener.connectStr
+ } else {
+ var errdialog = app.messageDialog.createObject(app, {
+ text: qsTr('Invalid node-id or connect string')
+ })
+ errdialog.open()
+ }
+ dialog.close()
+ })
+ dialog.open()
+ }
}
}
}
@@ -160,15 +159,10 @@ ElDialog {
}
}
- Label {
- text: qsTr('Amount')
- Layout.columnSpan: 3
- color: Material.accentColor
- }
-
BtcField {
id: amountBtc
fiatfield: amountFiat
+ Layout.topMargin: constants.paddingLarge
Layout.preferredWidth: amountFontMetrics.advanceWidth('0') * 14 + leftPadding + rightPadding
onTextAsSatsChanged: {
if (!is_max.checked)
@@ -327,4 +321,8 @@ ElDialog {
id: amountFontMetrics
font: amountBtc.font
}
+ FontMetrics {
+ id: nodeUriFontMetrics
+ font: nodeUri.font
+ }
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.