Browse Source

qml: various styling

master
Sander van Grieken 3 years ago
parent
commit
1210ef5f81
  1. 1
      electrum/gui/qml/components/OpenChannelDialog.qml
  2. 4
      electrum/gui/qml/components/OpenWalletDialog.qml
  3. 2
      electrum/gui/qml/components/controls/ChannelDelegate.qml
  4. 7
      electrum/gui/qml/components/controls/PasswordField.qml
  5. 11
      electrum/gui/qml/components/wizard/WCWalletPassword.qml

1
electrum/gui/qml/components/OpenChannelDialog.qml

@ -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()
}

4
electrum/gui/qml/components/OpenWalletDialog.qml

@ -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

2
electrum/gui/qml/components/controls/ChannelDelegate.qml

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

7
electrum/gui/qml/components/controls/PasswordField.qml

@ -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

11
electrum/gui/qml/components/wizard/WCWalletPassword.qml

@ -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
}
}
}

Loading…
Cancel
Save