From f15d6f5197c07cb25e97f7fb04d54c5775646224 Mon Sep 17 00:00:00 2001 From: Sander Ferdinand Date: Sun, 19 Nov 2017 21:14:05 +0100 Subject: [PATCH] Added some styles, changed some margins, testing with the new LineEdit --- LeftPanel.qml | 2 +- MiddlePanel.qml | 6 ++-- components/Style.qml | 4 +++ pages/Receive.qml | 5 ++- pages/Transfer.qml | 82 ++++++++++++++++++++++++++++++++++++++++---- 5 files changed, 88 insertions(+), 11 deletions(-) diff --git a/LeftPanel.qml b/LeftPanel.qml index 6122fae3..4679f1b0 100644 --- a/LeftPanel.qml +++ b/LeftPanel.qml @@ -127,7 +127,7 @@ Rectangle { anchors.top: parent.top anchors.topMargin: 8 anchors.left: parent.left - anchors.leftMargin: 190 + anchors.leftMargin: 184 font.bold: true color: "white" } diff --git a/MiddlePanel.qml b/MiddlePanel.qml index 6cac3f10..0f816704 100644 --- a/MiddlePanel.qml +++ b/MiddlePanel.qml @@ -69,7 +69,7 @@ Rectangle { signal getProofClicked(string txid, string address, string message); signal checkProofClicked(string txid, string address, string message, string signature); - color: "#F0EEEE" + color: "black" onCurrentViewChanged: { if (previousView) { @@ -163,8 +163,8 @@ Rectangle { ColumnLayout { anchors.fill: parent - anchors.margins: 2 - anchors.topMargin: appWindow.persistentSettings.customDecorations ? 30 : 0 + anchors.margins: 18 + anchors.topMargin: appWindow.persistentSettings.customDecorations ? 50 : 0 spacing: 0 Flickable { diff --git a/components/Style.qml b/components/Style.qml index cab0e062..c1bc3938 100644 --- a/components/Style.qml +++ b/components/Style.qml @@ -7,4 +7,8 @@ QtObject { property QtObject fontBold: FontLoader { id: _fontBold; source: "qrc:/fonts/SFUIDisplay-Bold.otf"; } property QtObject fontLight: FontLoader { id: _fontLight; source: "qrc:/fonts/SFUIDisplay-Light.otf"; } property QtObject fontRegular: FontLoader { id: _fontRegular; source: "qrc:/fonts/SFUIDisplay-Regular.otf"; } + + property string inputBoxBackground: "black" + property string inputBoxBackgroundError: "#FFDDDD" + property string inputBoxColor: "white" } diff --git a/pages/Receive.qml b/pages/Receive.qml index f839741e..2b070c9f 100644 --- a/pages/Receive.qml +++ b/pages/Receive.qml @@ -44,6 +44,9 @@ import moneroComponents.SubaddressModel 1.0 Rectangle { id: pageReceive color: "#F0EEEE" + property alias addressText : addressLine.text + property alias paymentIdText : paymentIdLine.text + property alias integratedAddressText : integratedAddressLine.text property var model property var current_address property alias addressText : pageReceive.current_address @@ -240,7 +243,7 @@ Rectangle { LineEdit { id: amountLine - fontSize: mainLayout.lineEditFontSize +// fontSize: mainLayout.lineEditFontSize placeholderText: qsTr("Amount to receive") + translationManager.emptyString readOnly: false width: mainLayout.editWidth diff --git a/pages/Transfer.qml b/pages/Transfer.qml index 8e6daebf..10aa5960 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -32,6 +32,7 @@ import QtQuick.Dialogs 1.2 import moneroComponents.PendingTransaction 1.0 import "../components" import moneroComponents.Wallet 1.0 +import "." 1.0 Rectangle { @@ -40,11 +41,8 @@ Rectangle { int priority, string description) signal sweepUnmixableClicked() - color: "#F0EEEE" - property string startLinkText: " (" + - qsTr("Start daemon") + - ")" + - translationManager.emptyString + color: "black" + property string startLinkText: qsTr(" (Start daemon)") + translationManager.emptyString property bool showAdvanced: false function scaleValueToMixinCount(scaleValue) { @@ -118,10 +116,23 @@ Rectangle { anchors.margins: 17 * scaleRatio spacing: 0 + RowLayout{ + Layout.fillWidth: true + Layout.bottomMargin: 20 + + Text { + id: panelHeader + font.family: Style.fontMedium.name + font.pixelSize: 32 * scaleRatio + color: "#FFFFFF" + text: "Send" + height: 150 + } + } + GridLayout { columns: (isMobile)? 1 : 2 Layout.fillWidth: true - ColumnLayout { Layout.fillWidth: true Label { @@ -212,6 +223,65 @@ Rectangle { z: parent.z + 1 } + ColumnLayout { + id: amountRowx + Label { + id: amountLabelx + text: qsTr("Amount") + translationManager.emptyString + width: mainLayout.labelWidth + } + + // this LineEdit is for testing purposes + LineEdit { + id: amountLinex + fontSize: mainLayout.lineEditFontSize + placeholderText: qsTr("Amount to receive") + translationManager.emptyString + readOnly: false + width: mainLayout.editWidth + Layout.fillWidth: true +// validator: DoubleValidator { +// bottom: 0.0 +// top: 18446744.073709551615 +// decimals: 12 +// notation: DoubleValidator.StandardNotation +// locale: "C" +// } + + Rectangle{ + color: "#808080" + border.color: "black" + height: 20 + width: 40 + radius: 3 + + anchors.top: parent.top + anchors.right: parent.right + anchors.rightMargin: 8 + anchors.topMargin: 8 + + Text { + id: xee + font.family: Style.fontBold.name + font.pixelSize: 16 * scaleRatio + color: "#FFFFFF" + text: "Send" + anchors.top: parent.top + 2 + anchors.left: parent.left + 6 + } + } + +// IconButton { +// imageSource: "../images/copyToClipboard.png" +// onClicked: { +// if (integratedAddressLine.text.length > 0) { +// clipboard.setText(integratedAddressLine.text) +// appWindow.showStatusMessage(qsTr("Integrated address copied to clipboard"),3) +// } +// } +// } + } + } + ColumnLayout { Layout.fillWidth: true Label {