From d98221ac56140b3e7a0b0b0348b6d06bfb9abb77 Mon Sep 17 00:00:00 2001 From: Sander Ferdinand Date: Tue, 27 Mar 2018 22:04:18 +0200 Subject: [PATCH] Fixes the placeholder texts for RemoteNodeEdit in the wallet creation wizard --- components/RemoteNodeEdit.qml | 20 +++++++++++++++++++- wizard/WizardDaemonSettings.qml | 17 +++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/components/RemoteNodeEdit.qml b/components/RemoteNodeEdit.qml index 4d44c156..6655e629 100644 --- a/components/RemoteNodeEdit.qml +++ b/components/RemoteNodeEdit.qml @@ -40,6 +40,14 @@ GridLayout { property alias daemonAddrLabelText: daemonAddr.labelText property alias daemonPortLabelText: daemonPort.labelText + // TODO: LEGACY; remove these placeHolder variables when + // the wizards get redesigned to the black-theme + property string placeholderFontFamily: Style.fontRegular.name + property bool placeholderFontBold: false + property int placeholderFontSize: 18 * scaleRatio + property string placeholderColor: Style.defaultFontColor + property real placeholderOpacity: 0.25 + property string lineEditBorderColor: Qt.rgba(0, 0, 0, 0.15) property string lineEditBackgroundColor: "white" property string lineEditFontColor: "black" @@ -55,6 +63,11 @@ GridLayout { id: daemonAddr Layout.fillWidth: true placeholderText: qsTr("Remote Node Hostname / IP") + translationManager.emptyString + placeholderFontFamily: root.placeholderFontFamily + placeholderFontBold: root.placeholderFontBold + placeholderFontSize: root.placeholderFontSize + placeholderColor: root.placeholderColor + placeholderOpacity: root.placeholderOpacity onEditingFinished: root.editingFinished() borderColor: lineEditBorderColor backgroundColor: lineEditBackgroundColor @@ -66,8 +79,13 @@ GridLayout { id: daemonPort Layout.fillWidth: true placeholderText: qsTr("Port") + translationManager.emptyString + placeholderFontFamily: root.placeholderFontFamily + placeholderFontBold: root.placeholderFontBold + placeholderFontSize: root.placeholderFontSize + placeholderColor: root.placeholderColor + placeholderOpacity: root.placeholderOpacity onEditingFinished: root.editingFinished() - + legacyWizardStyle: true borderColor: lineEditBorderColor backgroundColor: lineEditBackgroundColor fontColor: lineEditFontColor diff --git a/wizard/WizardDaemonSettings.qml b/wizard/WizardDaemonSettings.qml index 69947f74..c0a45e7a 100644 --- a/wizard/WizardDaemonSettings.qml +++ b/wizard/WizardDaemonSettings.qml @@ -152,6 +152,10 @@ ColumnLayout { Layout.preferredWidth: 200 * scaleRatio Layout.fillWidth: true text: persistentSettings.blockchainDataDir + placeholderFontBold: true + placeholderFontFamily: "Arial" + placeholderColor: Style.legacy_placeholderFontColor + placeholderOpacity: 1.0 placeholderText: qsTr("(optional)") + translationManager.emptyString borderColor: Qt.rgba(0, 0, 0, 0.15) @@ -182,6 +186,12 @@ ColumnLayout { Layout.minimumWidth: 300 * scaleRatio opacity: localNode.checked id: bootstrapNodeEdit + + placeholderFontBold: true + placeholderFontFamily: "Arial" + placeholderColor: Style.legacy_placeholderFontColor + placeholderOpacity: 1.0 + daemonAddrText: persistentSettings.bootstrapNodeAddress.split(":")[0].trim() daemonPortText: { var node_split = persistentSettings.bootstrapNodeAddress.split(":"); @@ -198,6 +208,7 @@ ColumnLayout { CheckBox { id: remoteNode text: qsTr("Connect to a remote node") + translationManager.emptyString + checkedIcon: "../images/checkedBlackIcon.png" Layout.topMargin: 20 * scaleRatio background: "#FFFFFF" fontColor: "#4A4646" @@ -218,6 +229,12 @@ ColumnLayout { property var rna: persistentSettings.remoteNodeAddress daemonAddrText: rna.search(":") != -1 ? rna.split(":")[0].trim() : "" daemonPortText: rna.search(":") != -1 ? (rna.split(":")[1].trim() == "") ? "18081" : persistentSettings.remoteNodeAddress.split(":")[1] : "" + + placeholderFontBold: true + placeholderFontFamily: "Arial" + placeholderColor: Style.legacy_placeholderFontColor + placeholderOpacity: 1.0 + lineEditBorderColor: Qt.rgba(0, 0, 0, 0.15) lineEditBackgroundColor: "white" lineEditFontColor: "black"