From e638ed0272ca042f3ad77b680665a91ed8a35cce Mon Sep 17 00:00:00 2001 From: Sander Ferdinand Date: Sat, 31 Mar 2018 03:25:20 +0200 Subject: [PATCH] Explicitly import MoneroComponents; prevent namespace pollution --- components/CheckBox.qml | 8 ++++---- components/DatePicker.qml | 27 +++++++++++++------------- components/HistoryTable.qml | 22 ++++++++++----------- components/HistoryTableInnerColumn.qml | 20 +++++++++---------- components/HistoryTableMobile.qml | 14 +++++++------ components/InlineButton.qml | 7 ++++--- components/Input.qml | 6 +++--- components/InputDialog.qml | 8 ++++---- components/InputMulti.qml | 8 ++++---- components/Label.qml | 6 +++--- components/LabelButton.qml | 5 +++-- components/LabelSubheader.qml | 7 ++++--- components/LineEdit.qml | 17 ++++++++-------- components/LineEditMulti.qml | 16 +++++++-------- components/MenuButton.qml | 5 +++-- components/MobileHeader.qml | 3 ++- components/NetworkStatusItem.qml | 7 ++++--- components/NewPasswordDialog.qml | 16 +++++++-------- components/PasswordDialog.qml | 8 ++++---- components/ProgressBar.qml | 7 ++++--- components/RemoteNodeEdit.qml | 6 ++++-- components/SearchInput.qml | 9 +++------ components/StandardButton.qml | 9 +++++---- components/StandardDialog.qml | 21 ++++++++------------ components/StandardDropdown.qml | 9 +++++---- components/SubaddressTable.qml | 16 +++++++-------- components/TextBlock.qml | 6 +++--- components/TickDelegate.qml | 4 ++-- 28 files changed, 151 insertions(+), 146 deletions(-) diff --git a/components/CheckBox.qml b/components/CheckBox.qml index 517917a3..4de0212f 100644 --- a/components/CheckBox.qml +++ b/components/CheckBox.qml @@ -28,7 +28,8 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 -import "." 1.0 + +import "../components" as MoneroComponents RowLayout { id: checkBox @@ -64,7 +65,6 @@ RowLayout { anchors.left: parent.left width: 25 * scaleRatio height: checkBox.height - 1 - //radius: 4 y: 1 color: "transparent" @@ -85,9 +85,9 @@ RowLayout { Text { id: label - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: checkBox.fontSize - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor wrapMode: Text.Wrap Layout.fillWidth: true anchors.left: backgroundRect.right diff --git a/components/DatePicker.qml b/components/DatePicker.qml index 5d3c44bd..0c999f83 100644 --- a/components/DatePicker.qml +++ b/components/DatePicker.qml @@ -29,9 +29,8 @@ import QtQuick 2.2 import QtQuick.Controls 1.2 import QtQuick.Controls.Styles 1.2 -import "../components" -import "." 1.0 +import "../components" as MoneroComponents Item { id: datePicker @@ -73,11 +72,11 @@ Item { anchors.top: parent.top anchors.topMargin: 2 anchors.left: parent.left - font.family: Style.fontLight.name + font.family: MoneroComponents.Style.fontLight.name font.pixelSize: 14 font.bold: false textFormat: Text.RichText - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor MouseArea { anchors.fill: parent @@ -166,9 +165,9 @@ Item { id: dayInput readOnly: true width: 22 - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 14 - color: datePicker.error ? errorColor : Style.defaultFontColor + color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor maximumLength: 2 horizontalAlignment: TextInput.AlignHCenter validator: IntValidator{bottom: 01; top: 31;} @@ -189,9 +188,9 @@ Item { } Text { - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 14 - color: datePicker.error ? errorColor : Style.defaultFontColor + color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor text: "-" } @@ -199,9 +198,9 @@ Item { id: monthInput readOnly: true width: 22 - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 14 - color: datePicker.error ? errorColor : Style.defaultFontColor + color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor maximumLength: 2 horizontalAlignment: TextInput.AlignHCenter validator: IntValidator{bottom: 01; top: 12;} @@ -221,18 +220,18 @@ Item { } Text { - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 14 - color: datePicker.error ? errorColor : Style.defaultFontColor + color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor text: "-" } TextInput { id: yearInput width: 44 - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 14 - color: datePicker.error ? errorColor : Style.defaultFontColor + color: datePicker.error ? errorColor : MoneroComponents.Style.defaultFontColor maximumLength: 4 horizontalAlignment: TextInput.AlignHCenter validator: IntValidator{bottom: 1000; top: 9999;} diff --git a/components/HistoryTable.qml b/components/HistoryTable.qml index 87c9be76..d5c9879c 100644 --- a/components/HistoryTable.qml +++ b/components/HistoryTable.qml @@ -29,9 +29,9 @@ import QtQuick 2.0 import moneroComponents.Clipboard 1.0 import moneroComponents.AddressBookModel 1.0 + import "../components" as MoneroComponents import "../js/TxUtils.js" as TxUtils -import "." 1.0 ListView { id: listView @@ -149,7 +149,7 @@ ListView { id: txrxLabel anchors.left: arrowImage.right anchors.leftMargin: 18 * scaleRatio - font.family: Style.fontLight.name + font.family: MoneroComponents.Style.fontLight.name font.pixelSize: 14 * scaleRatio text: isOut ? "Sent" : "Received" color: "#808080" @@ -161,7 +161,7 @@ ListView { anchors.leftMargin: 18 * scaleRatio anchors.top: txrxLabel.bottom anchors.topMargin: 0 * scaleRatio - font.family: Style.fontBold.name + font.family: MoneroComponents.Style.fontBold.name font.pixelSize: 18 * scaleRatio font.bold: true text: { @@ -187,7 +187,7 @@ ListView { Text { id: dateLabel anchors.left: parent.left - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 14 * scaleRatio text: date color: "#808080" @@ -211,7 +211,7 @@ ListView { anchors.left: parent.left anchors.top: dateLabel.bottom anchors.topMargin: 0 - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 16 * scaleRatio text: { if(isOut){ @@ -289,7 +289,7 @@ ListView { visible: delegate.collapsed // left column - HistoryTableInnerColumn{ + MoneroComponents.HistoryTableInnerColumn{ anchors.left: parent.left anchors.leftMargin: 30 * scaleRatio @@ -299,7 +299,7 @@ ListView { } // right column - HistoryTableInnerColumn{ + MoneroComponents.HistoryTableInnerColumn{ anchors.right: parent.right anchors.rightMargin: 100 * scaleRatio width: 200 * scaleRatio @@ -337,7 +337,7 @@ ListView { visible: delegate.collapsed // left column - HistoryTableInnerColumn{ + MoneroComponents.HistoryTableInnerColumn{ anchors.left: parent.left anchors.leftMargin: 30 * scaleRatio labelHeader: qsTr("Blockheight") @@ -357,7 +357,7 @@ ListView { } // right column - HistoryTableInnerColumn { + MoneroComponents.HistoryTableInnerColumn { visible: currentWallet.getUserNote(hash) anchors.right: parent.right anchors.rightMargin: 80 * scaleRatio @@ -425,7 +425,7 @@ ListView { } Text { - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor text: "P" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter @@ -470,7 +470,7 @@ ListView { } Text { - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor text: "?" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter diff --git a/components/HistoryTableInnerColumn.qml b/components/HistoryTableInnerColumn.qml index 23ff766e..8a8acbe7 100644 --- a/components/HistoryTableInnerColumn.qml +++ b/components/HistoryTableInnerColumn.qml @@ -32,8 +32,8 @@ import QtQuick.Dialogs 1.2 import moneroComponents.Clipboard 1.0 import moneroComponents.PendingTransaction 1.0 import moneroComponents.Wallet 1.0 -import "../components" -import "." 1.0 + +import "../components" as MoneroComponents Rectangle{ @@ -50,20 +50,20 @@ Rectangle{ Text { id: label1 anchors.left: parent.left - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 14 * scaleRatio text: labelHeader - color: Style.greyFontColor + color: MoneroComponents.Style.greyFontColor } Text { id: label2 anchors.left: parent.left anchors.top: label1.bottom - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 14 * scaleRatio text: labelValue - color: Style.dimmedFontColor + color: MoneroComponents.Style.dimmedFontColor } // hover effect / copy value @@ -73,12 +73,12 @@ Rectangle{ anchors.fill: parent cursorShape: Qt.PointingHandCursor onEntered: { - label1.color = Style.defaultFontColor; - label2.color = Style.defaultFontColor; + label1.color = MoneroComponents.Style.defaultFontColor; + label2.color = MoneroComponents.Style.defaultFontColor; } onExited: { - label1.color = Style.greyFontColor; - label2.color = Style.dimmedFontColor; + label1.color = MoneroComponents.Style.greyFontColor; + label2.color = MoneroComponents.Style.dimmedFontColor; } onClicked: { if(copyValue){ diff --git a/components/HistoryTableMobile.qml b/components/HistoryTableMobile.qml index 8ea5afcc..eb27612d 100644 --- a/components/HistoryTableMobile.qml +++ b/components/HistoryTableMobile.qml @@ -31,6 +31,8 @@ import QtQuick.Layouts 1.1 import moneroComponents.Clipboard 1.0 import moneroComponents.AddressBookModel 1.0 +import "../components" as MoneroComponents + ListView { id: listView clip: true @@ -152,16 +154,16 @@ ListView { Layout.topMargin: 20 * scaleRatio Layout.leftMargin: 10 * scaleRatio Text { - font.family: Style.fontMedium.name + font.family: MoneroComponents.Style.fontMedium.name font.pixelSize: 14 * scaleRatio - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor text: date } Text { font.family: Style.fontRegular.name font.pixelSize: 14 * scaleRatio - color: Style.dimmedFontColor + color: MoneroComponents.Style.dimmedFontColor text: time } @@ -169,7 +171,7 @@ ListView { Text { visible: confirmations < confirmationsRequired || isPending Layout.leftMargin: 5 * scaleRatio - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 14 * scaleRatio color: (confirmations < confirmationsRequired)? "#FF6C3C" : "#545454" text: { @@ -193,7 +195,7 @@ ListView { Text { font.family: "Arial" font.pixelSize: 14 * scaleRatio - color: isOut ? Style.defaultFontColor : "#2eb358" + color: isOut ? MoneroComponents.Style.defaultFontColor : "#2eb358" text: isOut ? "↓" : "↑" } @@ -201,7 +203,7 @@ ListView { id: amountText font.family: "Arial" font.pixelSize: 18 * scaleRatio - color: isOut ? Style.defaultFontColor : "#2eb358" + color: isOut ? MoneroComponents.Style.defaultFontColor : "#2eb358" text: displayAmount } } diff --git a/components/InlineButton.qml b/components/InlineButton.qml index 77f88f3d..cdbcd2ef 100644 --- a/components/InlineButton.qml +++ b/components/InlineButton.qml @@ -28,7 +28,8 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 -import "." 1.0 + +import "../components" as MoneroComponents Item { id: inlineButton @@ -51,7 +52,7 @@ Item { Rectangle{ id: rect - color: Style.buttonBackgroundColorDisabled + color: MoneroComponents.Style.buttonBackgroundColorDisabled border.color: "black" height: 28 * scaleRatio width: inlineText.width + 22 * scaleRatio @@ -62,7 +63,7 @@ Item { Text { id: inlineText - font.family: Style.fontBold.name + font.family: MoneroComponents.Style.fontBold.name font.bold: true font.pixelSize: 16 * scaleRatio color: "black" diff --git a/components/Input.qml b/components/Input.qml index d1ddae89..befeecc0 100644 --- a/components/Input.qml +++ b/components/Input.qml @@ -28,16 +28,16 @@ import QtQuick.Controls 2.2 import QtQuick 2.7 -import "." 1.0 +import "../components" as MoneroComponents TextField { - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 18 * scaleRatio font.bold: true horizontalAlignment: TextInput.AlignLeft selectByMouse: true - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor background: Rectangle { color: "transparent" diff --git a/components/InputDialog.qml b/components/InputDialog.qml index 37354b35..5119c9fc 100644 --- a/components/InputDialog.qml +++ b/components/InputDialog.qml @@ -81,9 +81,9 @@ Item { Layout.fillWidth: true font.pixelSize: 16 * scaleRatio - font.family: Style.fontLight.name + font.family: MoneroComponents.Style.fontLight.name - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor } TextField { @@ -94,13 +94,13 @@ Item { anchors.left: parent.left horizontalAlignment: TextInput.AlignLeft verticalAlignment: TextInput.AlignVCenter - font.family: Style.fontLight.name + font.family: MoneroComponents.Style.fontLight.name font.pixelSize: 24 * scaleRatio KeyNavigation.tab: okButton bottomPadding: 10 leftPadding: 10 topPadding: 10 - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor background: Rectangle { radius: 2 diff --git a/components/InputMulti.qml b/components/InputMulti.qml index 3b860fdf..88766ba7 100644 --- a/components/InputMulti.qml +++ b/components/InputMulti.qml @@ -27,10 +27,10 @@ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import QtQuick.Controls 2.2 - import QtQuick 2.7 + import "../js/TxUtils.js" as TxUtils -import "." 1.0 +import "../components" as MoneroComponents TextArea { @@ -41,12 +41,12 @@ TextArea { property bool fontBold: false id: textArea - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: fontSize font.bold: fontBold horizontalAlignment: TextInput.AlignLeft selectByMouse: true - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor wrapMode: { if(wrapAnywhere){ diff --git a/components/Label.qml b/components/Label.qml index b77a614c..11d43fa3 100644 --- a/components/Label.qml +++ b/components/Label.qml @@ -29,7 +29,7 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 -import "." 1.0 +import "../components" as MoneroComponents Item { id: item @@ -39,7 +39,7 @@ Item { property string tipText: "" property int fontSize: 16 * scaleRatio property bool fontBold: false - property string fontColor: Style.defaultFontColor + property string fontColor: MoneroComponents.Style.defaultFontColor property string fontFamily: "" property alias wrapMode: label.wrapMode property alias horizontalAlignment: label.horizontalAlignment @@ -57,7 +57,7 @@ Item { if(fontFamily){ return fontFamily; } else { - return Style.fontRegular.name; + return MoneroComponents.Style.fontRegular.name; } } font.pixelSize: fontSize diff --git a/components/LabelButton.qml b/components/LabelButton.qml index 38b05fbc..c2067117 100644 --- a/components/LabelButton.qml +++ b/components/LabelButton.qml @@ -28,7 +28,8 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 -import "." 1.0 + +import "../components" as MoneroComponents Rectangle { @@ -48,7 +49,7 @@ Rectangle { id: labelButtonText anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 12 font.bold: true text: "" diff --git a/components/LabelSubheader.qml b/components/LabelSubheader.qml index daa067e0..a2e4545e 100644 --- a/components/LabelSubheader.qml +++ b/components/LabelSubheader.qml @@ -27,7 +27,8 @@ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import QtQuick 2.0 -import "." 1.0 + +import "../components" as MoneroComponents Label { id: item @@ -39,7 +40,7 @@ Label { anchors.left: parent.left anchors.right: parent.right height: 2 - color: Style.dividerColor - opacity: Style.dividerOpacity + color: MoneroComponents.Style.dividerColor + opacity: MoneroComponents.Style.dividerOpacity } } diff --git a/components/LineEdit.qml b/components/LineEdit.qml index f7266d2c..50d40ae3 100644 --- a/components/LineEdit.qml +++ b/components/LineEdit.qml @@ -27,7 +27,8 @@ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import QtQuick 2.0 -import "." 1.0 + +import "../components" as MoneroComponents Item { id: item @@ -35,10 +36,10 @@ Item { property alias placeholderText: placeholderLabel.text property bool placeholderCenter: false - property string placeholderFontFamily: Style.fontRegular.name + property string placeholderFontFamily: MoneroComponents.Style.fontRegular.name property bool placeholderFontBold: false property int placeholderFontSize: 18 * scaleRatio - property string placeholderColor: Style.defaultFontColor + property string placeholderColor: MoneroComponents.Style.defaultFontColor property real placeholderOpacity: 0.25 property alias validator: input.validator @@ -105,11 +106,11 @@ Item { anchors.top: parent.top anchors.left: parent.left anchors.topMargin: 2 * scaleRatio - font.family: Style.fontLight.name + font.family: MoneroComponents.Style.fontLight.name font.pixelSize: labelFontSize font.bold: labelFontBold textFormat: Text.RichText - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor onLinkActivated: item.labelLinkActivated() MouseArea { @@ -119,7 +120,7 @@ Item { } } - LabelButton { + MoneroComponents.LabelButton { id: copyButtonId text: qsTr("Copy") anchors.right: parent.right @@ -190,7 +191,7 @@ Item { visible: false } - Input { + MoneroComponents.Input { id: input anchors.fill: parent anchors.leftMargin: inlineIcon.visible ? 38 : 0 @@ -201,7 +202,7 @@ Item { onTextChanged: item.textUpdated() } - InlineButton { + MoneroComponents.InlineButton { id: inlineButtonId visible: item.inlineButtonText ? true : false anchors.right: parent.right diff --git a/components/LineEditMulti.qml b/components/LineEditMulti.qml index b013156a..3468c9d5 100644 --- a/components/LineEditMulti.qml +++ b/components/LineEditMulti.qml @@ -28,8 +28,8 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 -import "." 1.0 +import "../components" as MoneroComponents ColumnLayout { id: lineditmulti @@ -64,21 +64,21 @@ ColumnLayout { id: inputLabel anchors.top: parent.top anchors.left: parent.left - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 16 * scaleRatio font.bold: labelFontBold textFormat: Text.RichText - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor onLinkActivated: inputLabelLinkActivated() } - LabelButton { + MoneroComponents.LabelButton { id: labelButton onClicked: labelButtonClicked() visible: labelButtonVisible } - LabelButton { + MoneroComponents.LabelButton { id: copyButtonId visible: copyButton && multiLine.text !== "" text: qsTr("Copy") @@ -94,7 +94,7 @@ ColumnLayout { } } - InputMulti { + MoneroComponents.InputMulti { id: multiLine readOnly: false addressValidation: true @@ -113,8 +113,8 @@ ColumnLayout { anchors.left: parent.left anchors.leftMargin: 10 * scaleRatio opacity: 0.25 - color: Style.defaultFontColor - font.family: Style.fontRegular.name + color: MoneroComponents.Style.defaultFontColor + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 18 * scaleRatio text: "" z: 3 diff --git a/components/MenuButton.qml b/components/MenuButton.qml index ef6da091..02b0d6d5 100644 --- a/components/MenuButton.qml +++ b/components/MenuButton.qml @@ -27,7 +27,8 @@ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import QtQuick 2.5 -import "." 1.0 + +import "../components" as MoneroComponents Rectangle { id: button @@ -103,7 +104,7 @@ Rectangle { anchors.verticalCenter: parent.verticalCenter anchors.left: parent.right anchors.leftMargin: 8 * scaleRatio - font.family: Style.fontMedium.name + font.family: MoneroComponents.Style.fontMedium.name font.bold: true font.pixelSize: 16 * scaleRatio color: "#FFFFFF" diff --git a/components/MobileHeader.qml b/components/MobileHeader.qml index 0cd9c5e6..53a080ad 100644 --- a/components/MobileHeader.qml +++ b/components/MobileHeader.qml @@ -1,8 +1,9 @@ import QtQuick 2.2 import QtGraphicalEffects 1.0 import QtQuick.Layouts 1.1 -import moneroComponents.Wallet 1.0 +import moneroComponents.Wallet 1.0 +import "../components" as MoneroComponents // BasicPanel header Rectangle { diff --git a/components/NetworkStatusItem.qml b/components/NetworkStatusItem.qml index f1916457..e9b1b3ae 100644 --- a/components/NetworkStatusItem.qml +++ b/components/NetworkStatusItem.qml @@ -28,8 +28,9 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 + import moneroComponents.Wallet 1.0 -import "." 1.0 +import "../components" as MoneroComponents Rectangle { id: item @@ -93,7 +94,7 @@ Rectangle { anchors.left: parent.left anchors.top: parent.top anchors.topMargin: 0 - font.family: Style.fontMedium.name + font.family: MoneroComponents.Style.fontMedium.name font.bold: true font.pixelSize: 13 * scaleRatio color: "white" @@ -106,7 +107,7 @@ Rectangle { anchors.left: parent.left anchors.top: parent.top anchors.topMargin: 14 - font.family: Style.fontMedium.name + font.family: MoneroComponents.Style.fontMedium.name font.pixelSize: 20 * scaleRatio color: "white" text: getConnectionStatusString(item.connected) + translationManager.emptyString diff --git a/components/NewPasswordDialog.qml b/components/NewPasswordDialog.qml index 9d4e4d20..d83364de 100644 --- a/components/NewPasswordDialog.qml +++ b/components/NewPasswordDialog.qml @@ -104,9 +104,9 @@ Item { Layout.fillWidth: true font.pixelSize: 16 * scaleRatio - font.family: Style.fontLight.name + font.family: MoneroComponents.Style.fontLight.name - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor } TextField { @@ -116,13 +116,13 @@ Item { anchors.left: parent.left horizontalAlignment: TextInput.AlignLeft verticalAlignment: TextInput.AlignVCenter - font.family: Style.fontLight.name + font.family: MoneroComponents.Style.fontLight.name font.pixelSize: 24 * scaleRatio echoMode: TextInput.Password bottomPadding: 10 leftPadding: 10 topPadding: 10 - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor KeyNavigation.tab: passwordInput2 background: Rectangle { @@ -162,9 +162,9 @@ Item { Layout.fillWidth: true font.pixelSize: 16 * scaleRatio - font.family: Style.fontLight.name + font.family: MoneroComponents.Style.fontLight.name - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor } TextField { @@ -174,14 +174,14 @@ Item { anchors.left: parent.left horizontalAlignment: TextInput.AlignLeft verticalAlignment: TextInput.AlignVCenter - font.family: Style.fontLight.name + font.family: MoneroComponents.Style.fontLight.name font.pixelSize: 24 * scaleRatio echoMode: TextInput.Password KeyNavigation.tab: okButton bottomPadding: 10 leftPadding: 10 topPadding: 10 - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor background: Rectangle { radius: 2 diff --git a/components/PasswordDialog.qml b/components/PasswordDialog.qml index dabf233a..10c5a571 100644 --- a/components/PasswordDialog.qml +++ b/components/PasswordDialog.qml @@ -85,9 +85,9 @@ Item { Layout.fillWidth: true font.pixelSize: 16 * scaleRatio - font.family: Style.fontLight.name + font.family: MoneroComponents.Style.fontLight.name - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor } TextField { @@ -97,14 +97,14 @@ Item { anchors.left: parent.left horizontalAlignment: TextInput.AlignLeft verticalAlignment: TextInput.AlignVCenter - font.family: Style.fontLight.name + font.family: MoneroComponents.Style.fontLight.name font.pixelSize: 24 * scaleRatio echoMode: TextInput.Password KeyNavigation.tab: okButton bottomPadding: 10 leftPadding: 10 topPadding: 10 - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor background: Rectangle { radius: 2 diff --git a/components/ProgressBar.qml b/components/ProgressBar.qml index 6e691d6e..5fc5ec9b 100644 --- a/components/ProgressBar.qml +++ b/components/ProgressBar.qml @@ -28,7 +28,8 @@ import QtQuick 2.0 import moneroComponents.Wallet 1.0 -import "." 1.0 + +import "../components" as MoneroComponents Rectangle { id: item @@ -62,7 +63,7 @@ Rectangle { id: progressText anchors.top: parent.top anchors.topMargin: 6 - font.family: Style.fontMedium.name + font.family: MoneroComponents.Style.fontMedium.name font.pixelSize: 13 * scaleRatio font.bold: true color: "white" @@ -75,7 +76,7 @@ Rectangle { anchors.top: parent.top anchors.topMargin: 6 anchors.right: parent.right - font.family: Style.fontMedium.name + font.family: MoneroComponents.Style.fontMedium.name font.pixelSize: 13 * scaleRatio font.bold: true color: "white" diff --git a/components/RemoteNodeEdit.qml b/components/RemoteNodeEdit.qml index 1f22956f..82b56899 100644 --- a/components/RemoteNodeEdit.qml +++ b/components/RemoteNodeEdit.qml @@ -31,6 +31,8 @@ import QtQuick.Controls.Styles 1.2 import QtQuick 2.2 import QtQuick.Layouts 1.1 +import "../components" as MoneroComponents + GridLayout { columns: (isMobile) ? 1 : 2 columnSpacing: 32 @@ -42,10 +44,10 @@ GridLayout { // TODO: LEGACY; remove these placeHolder variables when // the wizards get redesigned to the black-theme - property string placeholderFontFamily: Style.fontRegular.name + property string placeholderFontFamily: MoneroComponents.Style.fontRegular.name property bool placeholderFontBold: false property int placeholderFontSize: 18 * scaleRatio - property string placeholderColor: Style.defaultFontColor + property string placeholderColor: MoneroComponents.Style.defaultFontColor property real placeholderOpacity: 0.25 property string lineEditBorderColor: Qt.rgba(0, 0, 0, 0.15) diff --git a/components/SearchInput.qml b/components/SearchInput.qml index bad7f06b..371f1698 100644 --- a/components/SearchInput.qml +++ b/components/SearchInput.qml @@ -28,6 +28,8 @@ import QtQuick 2.0 +import "../components" as MoneroComponents + Item { id: item signal searchClicked(string text, int option) @@ -213,18 +215,13 @@ Item { } } - StandardButton { + MoneroComponents.StandardButton { id: button anchors.top: parent.top anchors.bottom: parent.bottom anchors.right: parent.right anchors.margins: 6 width: 80 - - shadowReleasedColor: "#C60F00" - shadowPressedColor: "#8C0B00" - pressedColor: "#C60F00" - releasedColor: "#FF4F41" text: qsTr("SEARCH") onClicked: item.searchClicked(input.text, droplist.currentOption) } diff --git a/components/StandardButton.qml b/components/StandardButton.qml index 02e08be8..39ddc061 100644 --- a/components/StandardButton.qml +++ b/components/StandardButton.qml @@ -28,13 +28,14 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 -import "." 1.0 + +import "../components" as MoneroComponents Item { id: button property string rightIcon: "" property string icon: "" - property string textColor: button.enabled? Style.buttonTextColor: Style.buttonTextColorDisabled + property string textColor: button.enabled? MoneroComponents.Style.buttonTextColor: MoneroComponents.Style.buttonTextColorDisabled property bool small: false property alias text: label.text property int fontSize: { @@ -59,7 +60,7 @@ Item { anchors.right: parent.right height: parent.height - 1 radius: 3 - color: parent.enabled ? Style.buttonBackgroundColor : Style.buttonBackgroundColorDisabled + color: parent.enabled ? MoneroComponents.Style.buttonBackgroundColor : MoneroComponents.Style.buttonBackgroundColorDisabled border.width: parent.focus ? 1 : 0 MouseArea { @@ -87,7 +88,7 @@ Item { anchors.left: parent.left anchors.right: parent.right horizontalAlignment: Text.AlignHCenter - font.family: Style.fontBold.name + font.family: MoneroComponents.Style.fontBold.name font.bold: true font.pixelSize: buttonArea.pressed ? button.fontSize - 1 : button.fontSize color: parent.textColor diff --git a/components/StandardDialog.qml b/components/StandardDialog.qml index 5f761ae4..4f6805aa 100644 --- a/components/StandardDialog.qml +++ b/components/StandardDialog.qml @@ -34,8 +34,6 @@ import QtQuick.Controls.Styles 1.4 import QtQuick.Window 2.0 import "../components" as MoneroComponents -import "." 1.0 - Rectangle { id: root @@ -104,12 +102,12 @@ Rectangle { //anchors {fill: parent; margins: 16 } Layout.alignment: Qt.AlignHCenter - Label { + MoneroComponents.Label { id: dialogTitle horizontalAlignment: Text.AlignHCenter fontSize: 18 * scaleRatio fontFamily: "Arial" - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor } } @@ -120,13 +118,13 @@ Rectangle { Layout.fillWidth: true Layout.fillHeight: true renderType: Text.QtRendering - font.family: Style.fontLight.name + font.family: MoneroComponents.Style.fontLight.name textFormat: TextEdit.AutoText readOnly: true font.pixelSize: 14 * scaleRatio selectByMouse: false wrapMode: TextEdit.Wrap - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor MouseArea { anchors.fill: parent @@ -175,7 +173,7 @@ Rectangle { // window borders Rectangle{ width: 1 - color: Style.grey + color: MoneroComponents.Style.grey anchors.left: parent.left anchors.top: parent.top anchors.bottom: parent.bottom @@ -183,7 +181,7 @@ Rectangle { Rectangle{ width: 1 - color: Style.grey + color: MoneroComponents.Style.grey anchors.right: parent.right anchors.top: parent.top anchors.bottom: parent.bottom @@ -191,7 +189,7 @@ Rectangle { Rectangle{ height: 1 - color: Style.grey + color: MoneroComponents.Style.grey anchors.left: parent.left anchors.top: parent.top anchors.right: parent.right @@ -199,12 +197,9 @@ Rectangle { Rectangle{ height: 1 - color: Style.grey + color: MoneroComponents.Style.grey anchors.left: parent.left anchors.bottom: parent.bottom anchors.right: parent.right } } - - - diff --git a/components/StandardDropdown.qml b/components/StandardDropdown.qml index 9ab90f4b..fce7cc45 100644 --- a/components/StandardDropdown.qml +++ b/components/StandardDropdown.qml @@ -27,7 +27,8 @@ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import QtQuick 2.0 -import "." 1.0 + +import "../components" as MoneroComponents Item { id: dropdown @@ -90,7 +91,7 @@ Item { anchors.left: parent.left anchors.leftMargin: 12 * scaleRatio elide: Text.ElideRight - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.bold: dropdown.headerFontBold font.pixelSize: dropdown.fontHeaderSize color: "#FFFFFF" @@ -183,7 +184,7 @@ Item { anchors.right: col2Text.left anchors.leftMargin: 12 * scaleRatio anchors.rightMargin: 0 - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.bold: true font.pixelSize: fontItemSize color: itemArea.containsMouse || index === column.currentIndex || itemArea.containsMouse ? "#FA6800" : "#FFFFFF" @@ -195,7 +196,7 @@ Item { anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right anchors.rightMargin: 45 * scaleRatio - font.family: Style.fontRegular.name + font.family: MoneroComponents.Style.fontRegular.name font.pixelSize: 14 * scaleRatio color: "#FFFFFF" text: "" diff --git a/components/SubaddressTable.qml b/components/SubaddressTable.qml index 811d1199..a024e519 100644 --- a/components/SubaddressTable.qml +++ b/components/SubaddressTable.qml @@ -28,8 +28,8 @@ import QtQuick 2.0 import moneroComponents.Clipboard 1.0 -import "../components" -import "." 1.0 + +import "../components" as MoneroComponents ListView { id: listView @@ -48,7 +48,7 @@ ListView { width: listView.width clip: true - LineEditMulti { + MoneroComponents.LineEditMulti { id: addressLine fontSize: 14 @@ -68,7 +68,7 @@ ListView { addressValidation: false } - IconButton { + MoneroComponents.IconButton { id: clipboardButton imageSource: "../images/copyToClipboard.png" @@ -104,7 +104,7 @@ ListView { font.family: "Arial" font.bold: true font.pixelSize: 12 - color: Style.greyFontColor + color: MoneroComponents.Style.greyFontColor text: label } @@ -126,7 +126,7 @@ ListView { anchors.top: parent.top anchors.bottom: parent.bottom width: 1 - color: Style.grey + color: MoneroComponents.Style.grey z: 6 } @@ -135,7 +135,7 @@ ListView { anchors.top: parent.top anchors.bottom: parent.bottom width: 1 - color: Style.grey + color: MoneroComponents.Style.grey z: 6 } @@ -143,7 +143,7 @@ ListView { anchors.right: parent.right anchors.left: parent.left anchors.bottom: parent.bottom - color: Style.grey + color: MoneroComponents.Style.grey height: 1 z: 6 } diff --git a/components/TextBlock.qml b/components/TextBlock.qml index 875a4bf7..e06c6ae9 100644 --- a/components/TextBlock.qml +++ b/components/TextBlock.qml @@ -1,10 +1,10 @@ import QtQuick 2.0 -import "." 1.0 +import "../components" as MoneroComponents TextEdit { - color: Style.defaultFontColor - font.family: Style.fontRegular.name + color: MoneroComponents.Style.defaultFontColor + font.family: MoneroComponents.Style.fontRegular.name wrapMode: Text.Wrap readOnly: true selectByMouse: true diff --git a/components/TickDelegate.qml b/components/TickDelegate.qml index 94ead579..b09b0ceb 100644 --- a/components/TickDelegate.qml +++ b/components/TickDelegate.qml @@ -27,8 +27,8 @@ // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import QtQuick 2.0 -import "." 1.0 +import "../components" as MoneroComponents Item { id: delegateItem @@ -52,7 +52,7 @@ Item { font.family: "Arial" font.bold: true font.pixelSize: 12 * scaleRatio - color: Style.defaultFontColor + color: MoneroComponents.Style.defaultFontColor text: { if(currentIndex === 0) return qsTr("Default") + translationManager.emptyString if(currentIndex === 13) return qsTr("High") + translationManager.emptyString