1
0

qml: small form-factor fixes

This commit is contained in:
Sander van Grieken
2022-11-14 18:22:05 +01:00
parent ce35e68514
commit 24524119f6
3 changed files with 74 additions and 65 deletions

View File

@@ -252,12 +252,13 @@ Pane {
columns: 2 columns: 2
Label { Label {
text: qsTr('Derivation prefix') text: qsTr('Derivation prefix')
visible: Daemon.currentWallet.isDeterministic visible: Daemon.currentWallet.derivationPrefix
color: Material.accentColor color: Material.accentColor
} }
Label { Label {
Layout.fillWidth: true
text: Daemon.currentWallet.derivationPrefix text: Daemon.currentWallet.derivationPrefix
visible: Daemon.currentWallet.isDeterministic visible: Daemon.currentWallet.derivationPrefix
} }
Label { Label {

View File

@@ -22,10 +22,9 @@ WizardComponent {
clip:true clip:true
interactive: height < contentHeight interactive: height < contentHeight
GridLayout { ColumnLayout {
id: mainLayout id: mainLayout
width: parent.width width: parent.width
columns: 1
InfoTextArea { InfoTextArea {
Layout.fillWidth: true Layout.fillWidth: true
@@ -33,21 +32,22 @@ WizardComponent {
qsTr('If you lose your seed, your money will be permanently lost.') + ' ' + qsTr('If you lose your seed, your money will be permanently lost.') + ' ' +
qsTr('To make sure that you have properly saved your seed, please retype it here.') qsTr('To make sure that you have properly saved your seed, please retype it here.')
} }
Label { text: qsTr('Confirm your seed (re-enter)') }
Label {
text: qsTr('Confirm your seed (re-enter)')
}
SeedTextArea { SeedTextArea {
id: confirm id: confirm
Layout.fillWidth: true Layout.fillWidth: true
onTextChanged: { onTextChanged: checkValid()
checkValid()
}
} }
TextField { TextField {
id: customwordstext id: customwordstext
Layout.fillWidth: true Layout.fillWidth: true
placeholderText: qsTr('Enter your custom word(s)') placeholderText: qsTr('Enter your custom word(s)')
onTextChanged: { onTextChanged: checkValid()
checkValid()
}
} }
} }
} }

View File

@@ -29,70 +29,78 @@ WizardComponent {
wizard_data['multisig_cosigner_data'] = {} wizard_data['multisig_cosigner_data'] = {}
} }
ColumnLayout { Flickable {
width: parent.width anchors.fill: parent
contentHeight: rootLayout.height
clip:true
interactive: height < contentHeight
Label { text: qsTr('Multisig wallet') } ColumnLayout {
id: rootLayout
width: parent.width
InfoTextArea { Label { text: qsTr('Multisig wallet') }
Layout.preferredWidth: parent.width
text: qsTr('Choose the number of participants, and the number of signatures needed to unlock funds in your wallet.')
}
Piechart { InfoTextArea {
id: piechart Layout.preferredWidth: parent.width
Layout.preferredWidth: parent.width * 1/2 text: qsTr('Choose the number of participants, and the number of signatures needed to unlock funds in your wallet.')
Layout.alignment: Qt.AlignHCenter }
Layout.preferredHeight: 200 // TODO
showLegend: false Piechart {
innerOffset: 3 id: piechart
function updateSlices() { Layout.preferredWidth: parent.width * 1/2
var s = [] Layout.alignment: Qt.AlignHCenter
for (let i=0; i < participants; i++) { Layout.preferredHeight: 200 // TODO
var item = { showLegend: false
v: (1/participants), innerOffset: 3
color: i < signatures ? constants.colorPiechartSignature : constants.colorPiechartParticipant function updateSlices() {
var s = []
for (let i=0; i < participants; i++) {
var item = {
v: (1/participants),
color: i < signatures ? constants.colorPiechartSignature : constants.colorPiechartParticipant
}
s.push(item)
} }
s.push(item) piechart.slices = s
} }
piechart.slices = s
} }
}
Label { Label {
text: qsTr('Number of cosigners: %1').arg(participants) text: qsTr('Number of cosigners: %1').arg(participants)
}
Slider {
id: participants_slider
Layout.preferredWidth: parent.width * 4/5
Layout.alignment: Qt.AlignHCenter
snapMode: Slider.SnapAlways
stepSize: 1
from: 2
to: 15
onValueChanged: {
if (activeFocus)
participants = value
} }
}
Label { Slider {
text: qsTr('Number of signatures: %1').arg(signatures) id: participants_slider
} Layout.preferredWidth: parent.width * 4/5
Layout.alignment: Qt.AlignHCenter
snapMode: Slider.SnapAlways
stepSize: 1
from: 2
to: 15
onValueChanged: {
if (activeFocus)
participants = value
}
}
Slider { Label {
id: signatures_slider text: qsTr('Number of signatures: %1').arg(signatures)
Layout.preferredWidth: parent.width * 4/5 }
Layout.alignment: Qt.AlignHCenter
snapMode: Slider.SnapAlways Slider {
stepSize: 1 id: signatures_slider
from: 1 Layout.preferredWidth: parent.width * 4/5
to: participants Layout.alignment: Qt.AlignHCenter
value: signatures snapMode: Slider.SnapAlways
onValueChanged: { stepSize: 1
if (activeFocus) from: 1
signatures = value to: participants
value: signatures
onValueChanged: {
if (activeFocus)
signatures = value
}
} }
} }
} }