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 { FlatButton {
Layout.fillWidth: true Layout.fillWidth: true
text: qsTr('Open Channel') text: qsTr('Open Channel')
icon.source: '../../icons/confirmed.png'
enabled: channelopener.valid enabled: channelopener.valid
onClicked: channelopener.open_channel() onClicked: channelopener.open_channel()
} }

View File

@@ -44,7 +44,9 @@ ElDialog {
InfoTextArea { InfoTextArea {
id: notice 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 visible: wallet_db.needsPassword
iconStyle: InfoTextArea.IconStyle.Warn iconStyle: InfoTextArea.IconStyle.Warn
Layout.fillWidth: true Layout.fillWidth: true

View File

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

View File

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

View File

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