Browse Source

wrap potentially large pages in a flickable, for small form factors

patch-4
Sander van Grieken 3 years ago
parent
commit
d49b168389
  1. 218
      electrum/gui/qml/components/WizardComponents.qml

218
electrum/gui/qml/components/WizardComponents.qml

@ -137,41 +137,49 @@ Item {
warningtext.text = t.join("") warningtext.text = t.join("")
} }
GridLayout { Flickable {
width: parent.width anchors.fill: parent
columns: 1 contentHeight: mainLayout.height
clip:true
InfoTextArea { interactive: height < contentHeight
id: warningtext
Layout.fillWidth: true GridLayout {
iconStyle: InfoTextArea.IconStyle.Warn id: mainLayout
} width: parent.width
Label { text: qsTr('Your wallet generation seed is:') } columns: 1
SeedTextArea {
id: seedtext InfoTextArea {
readOnly: true id: warningtext
Layout.fillWidth: true Layout.fillWidth: true
iconStyle: InfoTextArea.IconStyle.Warn
BusyIndicator { }
anchors.centerIn: parent Label { text: qsTr('Your wallet generation seed is:') }
height: parent.height * 2/3 SeedTextArea {
visible: seedtext.text == '' id: seedtext
readOnly: true
Layout.fillWidth: true
BusyIndicator {
anchors.centerIn: parent
height: parent.height * 2/3
visible: seedtext.text == ''
}
}
CheckBox {
id: extendcb
text: qsTr('Extend seed with custom words')
}
TextField {
id: customwordstext
visible: extendcb.checked
Layout.fillWidth: true
placeholderText: qsTr('Enter your custom word(s)')
echoMode: TextInput.Password
}
Component.onCompleted : {
setWarningText(12)
bitcoin.generate_seed()
} }
}
CheckBox {
id: extendcb
text: qsTr('Extend seed with custom words')
}
TextField {
id: customwordstext
visible: extendcb.checked
Layout.fillWidth: true
placeholderText: qsTr('Enter your custom word(s)')
echoMode: TextInput.Password
}
Component.onCompleted : {
setWarningText(12)
bitcoin.generate_seed()
} }
} }
@ -222,47 +230,55 @@ Item {
infotext.text = t[seed_type.currentText] infotext.text = t[seed_type.currentText]
} }
GridLayout { Flickable {
width: parent.width anchors.fill: parent
columns: 2 contentHeight: mainLayout.height
clip:true
interactive: height < contentHeight
Label { GridLayout {
text: qsTr('Seed Type') id: mainLayout
} width: parent.width
ComboBox { columns: 2
id: seed_type
model: ['Electrum', 'BIP39', 'SLIP39'] Label {
onActivated: setSeedTypeHelpText() text: qsTr('Seed Type')
} }
InfoTextArea { ComboBox {
id: infotext id: seed_type
Layout.fillWidth: true model: ['Electrum', 'BIP39', 'SLIP39']
Layout.columnSpan: 2 onActivated: setSeedTypeHelpText()
} }
Label { InfoTextArea {
text: qsTr('Enter your seed') id: infotext
Layout.columnSpan: 2 Layout.fillWidth: true
} Layout.columnSpan: 2
SeedTextArea { }
id: seedtext Label {
Layout.fillWidth: true text: qsTr('Enter your seed')
Layout.columnSpan: 2 Layout.columnSpan: 2
onTextChanged: { }
checkValid() SeedTextArea {
id: seedtext
Layout.fillWidth: true
Layout.columnSpan: 2
onTextChanged: {
checkValid()
}
}
CheckBox {
id: extendcb
Layout.columnSpan: 2
text: qsTr('Extend seed with custom words')
}
TextField {
id: customwordstext
visible: extendcb.checked
Layout.fillWidth: true
Layout.columnSpan: 2
placeholderText: qsTr('Enter your custom word(s)')
echoMode: TextInput.Password
} }
}
CheckBox {
id: extendcb
Layout.columnSpan: 2
text: qsTr('Extend seed with custom words')
}
TextField {
id: customwordstext
visible: extendcb.checked
Layout.fillWidth: true
Layout.columnSpan: 2
placeholderText: qsTr('Enter your custom word(s)')
echoMode: TextInput.Password
} }
} }
@ -285,31 +301,39 @@ Item {
valid = seedvalid && (wizard_data['seed_extend'] ? customwordsvalid : true) valid = seedvalid && (wizard_data['seed_extend'] ? customwordsvalid : true)
} }
GridLayout { Flickable {
width: parent.width anchors.fill: parent
columns: 1 contentHeight: mainLayout.height
clip:true
InfoTextArea { interactive: height < contentHeight
Layout.fillWidth: true
text: qsTr('Your seed is important!') + ' ' + GridLayout {
qsTr('If you lose your seed, your money will be permanently lost.') + ' ' + id: mainLayout
qsTr('To make sure that you have properly saved your seed, please retype it here.') width: parent.width
} columns: 1
Label { text: qsTr('Confirm your seed (re-enter)') }
SeedTextArea { InfoTextArea {
id: confirm Layout.fillWidth: true
Layout.fillWidth: true text: qsTr('Your seed is important!') + ' ' +
onTextChanged: { qsTr('If you lose your seed, your money will be permanently lost.') + ' ' +
checkValid() qsTr('To make sure that you have properly saved your seed, please retype it here.')
} }
} Label { text: qsTr('Confirm your seed (re-enter)') }
TextField { SeedTextArea {
id: customwordstext id: confirm
Layout.fillWidth: true Layout.fillWidth: true
placeholderText: qsTr('Enter your custom word(s)') onTextChanged: {
echoMode: TextInput.Password checkValid()
onTextChanged: { }
checkValid() }
TextField {
id: customwordstext
Layout.fillWidth: true
placeholderText: qsTr('Enter your custom word(s)')
echoMode: TextInput.Password
onTextChanged: {
checkValid()
}
} }
} }
} }

Loading…
Cancel
Save