1
0

qml: various styling

This commit is contained in:
Sander van Grieken
2023-03-09 16:13:24 +01:00
parent 7584ba00ce
commit 1210ef5f81
5 changed files with 20 additions and 5 deletions

View File

@@ -169,6 +169,7 @@ ElDialog {
FlatButton {
Layout.fillWidth: true
text: qsTr('Open Channel')
icon.source: '../../icons/confirmed.png'
enabled: channelopener.valid
onClicked: channelopener.open_channel()
}

View File

@@ -44,7 +44,9 @@ ElDialog {
InfoTextArea {
id: notice
text: qsTr("Wallet <b>%1</b> requires password to unlock").arg(name)
text: Daemon.singlePasswordEnabled
? qsTr('Please enter password')
: qsTr('Wallet <b>%1</b> requires password to unlock').arg(name)
visible: wallet_db.needsPassword
iconStyle: InfoTextArea.IconStyle.Warn
Layout.fillWidth: true

View File

@@ -22,7 +22,7 @@ ItemDelegate {
left: parent.left
right: parent.right
leftMargin: constants.paddingSmall
rightMargin: constants.paddingSmall
rightMargin: constants.paddingMedium
}
columns: 2

View File

@@ -6,6 +6,9 @@ RowLayout {
id: root
property alias text: password_tf.text
property alias tf: password_tf
property alias echoMode: password_tf.echoMode
property bool showReveal: true
signal accepted
TextField {
@@ -17,6 +20,10 @@ RowLayout {
onAccepted: root.accepted()
}
ToolButton {
id: revealButton
enabled: root.showReveal
opacity: root.showReveal ? 1 : 0
icon.source: '../../../icons/eye1.png'
onClicked: {
password_tf.echoMode = password_tf.echoMode == TextInput.Password ? TextInput.Normal : TextInput.Password

View File

@@ -12,14 +12,19 @@ WizardComponent {
wizard_data['encrypt'] = password1.text != ''
}
GridLayout {
columns: 1
Label { text: qsTr('Password protect wallet?') }
ColumnLayout {
Label {
text: Daemon.singlePasswordEnabled
? qsTr('Enter password')
: qsTr('Enter password for %1').arg(wizard_data['wallet_name'])
}
PasswordField {
id: password1
}
PasswordField {
id: password2
showReveal: false
echoMode: password1.echoMode
}
}
}