Restyles the wizard's finish page

This commit is contained in:
maitscha 2016-11-03 10:01:32 +01:00
parent 6c6b10855f
commit 4097c7157e

View file

@ -38,19 +38,37 @@ Item {
onOpacityChanged: visible = opacity !== 0 onOpacityChanged: visible = opacity !== 0
function buildSettingsString() { function buildSettingsString() {
var str = "<br>" + qsTr("<b>Language:</b> ") + wizard.settings['language'] + "<br>" var trStart = '<tr><td style="padding-top:5px;"><b>',
+ qsTr("<b>Account name:</b> ") + wizard.settings['account_name'] + "<br>" trMiddle = '</b></td><td style="padding-left:10px;padding-top:5px;">',
+ qsTr("<b>Words:</b> ") + wizard.settings['wallet'].seed + "<br>" trEnd = "</td></tr>",
+ qsTr("<b>Wallet Path: </b>") + wizard.settings['wallet_path'] + "<br>" autoDonationEnabled = wizard.settings['auto_donations_enabled'] === true,
+ qsTr("<b>Enable auto donation: </b>") + wizard.settings['auto_donations_enabled'] + "<br>" autoDonationText = autoDonationEnabled ? qsTr("Enabled") : qsTr("Disabled"),
+ qsTr("<b>Auto donation amount: </b>") + wizard.settings['auto_donations_amount'] + "<br>" autoDonationAmount = wizard.settings["auto_donations_amount"] + " %",
+ qsTr("<b>Allow background mining: </b>") + wizard.settings['allow_background_mining'] + "<br>" backgroundMiningEnabled = wizard.settings["allow_background_mining"] === true,
+ qsTr("<b>Daemon address: </b>") + wizard.settings['daemon_address'] + "<br>" backgroundMiningText = backgroundMiningEnabled ? qsTr("Enabled") : qsTr("Disabled"),
+ qsTr("<b>testnet: </b>") + wizard.settings['testnet'] + "<br>" testnetEnabled = wizard.settings['testnet'] === true,
+ (wizard.settings['restore_height'] === undefined ? "" : qsTr("<b>Restore height: </b>") + wizard.settings['restore_height']) + "<br>" testnetText = testnetEnabled ? qsTr("Enabled") : qsTr("Disabled"),
+ translationManager.emptyString restoreHeightEnabled = wizard.settings['restore_height'] !== undefined;
return str;
return "<table>"
+ trStart + qsTr("Language") + trMiddle + wizard.settings["language"] + trEnd
+ trStart + qsTr("Account name") + trMiddle + wizard.settings["account_name"] + trEnd
+ trStart + qsTr("Words") + trMiddle + wizard.settings["wallet"].seed + trEnd
+ trStart + qsTr("Wallet path") + trMiddle + wizard.settings["wallet_path"] + trEnd
+ trStart + qsTr("Auto donations") + trMiddle + autoDonationText + trEnd
+ (autoDonationEnabled
? trStart + qsTr("Donation amount") + trMiddle + autoDonationAmount + trEnd
: "")
+ trStart + qsTr("Background mining") + trMiddle + backgroundMiningText + trEnd
+ trStart + qsTr("Daemon address") + trMiddle + wizard.settings["daemon_address"] + trEnd
+ trStart + qsTr("Testnet") + trMiddle + testnetText + trEnd
+ (restoreHeightEnabled
? trStart + qsTr("Restore height") + trMiddle + wizard.settings['restore_height'] + trEnd
: "")
+ "</table>"
+ translationManager.emptyString;
} }
function updateSettingsSummary() { function updateSettingsSummary() {
settingsText.text = qsTr("An overview of your Monero configuration is below:") + translationManager.emptyString settingsText.text = qsTr("An overview of your Monero configuration is below:") + translationManager.emptyString
+ "<br>" + "<br>"
@ -115,10 +133,10 @@ Item {
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
font.family: "Arial" font.family: "Arial"
font.pixelSize: 18 font.pixelSize: 16
wrapMode: Text.Wrap wrapMode: Text.Wrap
textFormat: Text.RichText textFormat: Text.RichText
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHLeft
//renderType: Text.NativeRendering //renderType: Text.NativeRendering
color: "#4A4646" color: "#4A4646"
} }