From e43006335113a8b325303fe151e370bfbe159e53 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 17 Apr 2023 17:08:11 +0200 Subject: [PATCH] PIN dialog: display auth message as title, if available --- electrum/gui/qml/components/Pin.qml | 9 +-------- electrum/gui/qml/components/controls/ElDialog.qml | 1 + 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/electrum/gui/qml/components/Pin.qml b/electrum/gui/qml/components/Pin.qml index eb0e63c92..591e4795a 100644 --- a/electrum/gui/qml/components/Pin.qml +++ b/electrum/gui/qml/components/Pin.qml @@ -18,7 +18,7 @@ ElDialog { property int _phase: mode == 'enter' ? 1 : 0 // 0 = existing pin, 1 = new pin, 2 = re-enter new pin property string _pin - title: qsTr('PIN') + title: authMessage ? authMessage : qsTr('PIN') iconSource: '../../../icons/lock.png' width: parent.width * 3/4 z: 1000 @@ -70,13 +70,6 @@ ElDialog { ColumnLayout { width: parent.width - Label { - Layout.fillWidth: true - visible: authMessage - text: authMessage - wrapMode: Text.Wrap - } - Label { text: [qsTr('Enter PIN'), qsTr('Enter New PIN'), qsTr('Re-enter New PIN')][_phase] font.pixelSize: constants.fontSizeXXLarge diff --git a/electrum/gui/qml/components/controls/ElDialog.qml b/electrum/gui/qml/components/controls/ElDialog.qml index ebc133919..82da7759c 100644 --- a/electrum/gui/qml/components/controls/ElDialog.qml +++ b/electrum/gui/qml/components/controls/ElDialog.qml @@ -73,6 +73,7 @@ Dialog { Label { text: title + wrapMode: Text.Wrap elide: Label.ElideRight Layout.fillWidth: true leftPadding: constants.paddingXLarge