What changed, and why it matters
This commit is purely a user-interface styling tweak for the one-time password (OTP) dialog in Electrum's QML (mobile-style) GUI. It sets the character used to calculate the input field width to '8', adds left/right padding to that width calculation, and changes how an error label is horizontally centered. There is no security-relevant change.
No security action required. Treat as a normal UI polish commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies electrum/gui/qml/components/OtpDialog.qml. It adds a local passwordCharacter property set to ‘8’ (previously inherited or undefined in this scope), updates the TextField’s preferredWidth to include leftPadding + rightPadding plus the advance width of six password characters, and switches the error Label’s horizontal centering from Layout.alignment to horizontalAlignment while enabling Layout.fillWidth. These are layout/styling adjustments only.
Changed components
electrum/gui/qml/components/OtpDialog.qmlInspect captured patch +3 / −3
### electrum/gui/qml/components/OtpDialog.qml
@@ -17,7 +17,7 @@ ElDialog {
property bool _waiting: false
property string _otpError
-
+ property string passwordCharacter: '8'
focus: true
ColumnLayout {
@@ -31,7 +31,7 @@ ElDialog {
TextField {
id: otpEdit
- Layout.preferredWidth: fontMetrics.advanceWidth(passwordCharacter) * 6
+ Layout.preferredWidth: leftPadding + rightPadding + fontMetrics.advanceWidth(passwordCharacter) * 6
Layout.alignment: Qt.AlignHCenter
font.pixelSize: constants.fontSizeXXLarge
maximumLength: 6
@@ -51,9 +51,9 @@ ElDialog {
Label {
Layout.topMargin: constants.paddingMedium
Layout.bottomMargin: constants.paddingMedium
- Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
wrapMode: Text.Wrap
+ horizontalAlignment: Text.AlignHCenter
text: _otpError
color: constants.colorErrorWhy 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.