diff --git a/electrum/gui/qml/components/Constants.qml b/electrum/gui/qml/components/Constants.qml index 19ed130d6..5aee068ed 100644 --- a/electrum/gui/qml/components/Constants.qml +++ b/electrum/gui/qml/components/Constants.qml @@ -1,7 +1,7 @@ import QtQuick 2.6 import QtQuick.Controls.Material 2.0 -QtObject { +Item { readonly property int paddingTiny: 4 readonly property int paddingSmall: 8 readonly property int paddingMedium: 12 @@ -24,4 +24,5 @@ QtObject { property color colorCredit: "#ff80ff80" property color colorDebit: "#ffff8080" + property color mutedForeground: Qt.lighter(Material.background, 2) } diff --git a/electrum/gui/qml/components/RequestDialog.qml b/electrum/gui/qml/components/RequestDialog.qml index b1633f45f..29586ed6c 100644 --- a/electrum/gui/qml/components/RequestDialog.qml +++ b/electrum/gui/qml/components/RequestDialog.qml @@ -29,10 +29,10 @@ Dialog { text: dialog.title visible: dialog.title elide: Label.ElideRight - padding: 24 + padding: constants.paddingXLarge bottomPadding: 0 font.bold: true - font.pixelSize: 16 + font.pixelSize: constants.fontSizeMedium } } diff --git a/electrum/gui/qml/components/WalletMainView.qml b/electrum/gui/qml/components/WalletMainView.qml index c21faecbb..3cfe60464 100644 --- a/electrum/gui/qml/components/WalletMainView.qml +++ b/electrum/gui/qml/components/WalletMainView.qml @@ -53,12 +53,12 @@ Item { ColumnLayout { anchors.centerIn: parent width: parent.width - spacing: 40 + spacing: 2*constants.paddingXLarge visible: Daemon.currentWallet == null Label { text: qsTr('No wallet loaded') - font.pixelSize: 24 + font.pixelSize: constants.fontSizeXXLarge Layout.alignment: Qt.AlignHCenter } diff --git a/electrum/gui/qml/components/Wallets.qml b/electrum/gui/qml/components/Wallets.qml index 5393b6c34..c3a7696a3 100644 --- a/electrum/gui/qml/components/Wallets.qml +++ b/electrum/gui/qml/components/Wallets.qml @@ -88,7 +88,7 @@ Pane { } Label { - font.pixelSize: 18 + font.pixelSize: constants.fontSizeLarge text: model.name Layout.fillWidth: true } diff --git a/electrum/gui/qml/components/controls/InfoTextArea.qml b/electrum/gui/qml/components/controls/InfoTextArea.qml index 45110c124..ec55c9527 100644 --- a/electrum/gui/qml/components/controls/InfoTextArea.qml +++ b/electrum/gui/qml/components/controls/InfoTextArea.qml @@ -28,8 +28,8 @@ GridLayout { id: infotext Layout.fillWidth: true readOnly: true - rightPadding: 16 - leftPadding: 64 + rightPadding: constants.paddingLarge + leftPadding: 2*constants.iconSizeLarge wrapMode: TextInput.WordWrap textFormat: TextEdit.RichText background: Rectangle { @@ -40,10 +40,10 @@ GridLayout { source: iconStyle == InfoTextArea.IconStyle.Info ? "../../../icons/info.png" : InfoTextArea.IconStyle.Warn ? "../../../icons/warning.png" : InfoTextArea.IconStyle.Error ? "../../../icons/expired.png" : "" anchors.left: parent.left anchors.top: parent.top - anchors.leftMargin: 16 - anchors.topMargin: 16 - height: 32 - width: 32 + anchors.leftMargin: constants.paddingLarge + anchors.topMargin: constants.paddingLarge + height: constants.iconSizeLarge + width: constants.iconSizeLarge fillMode: Image.PreserveAspectCrop } diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml index 61398a093..576c5c48d 100644 --- a/electrum/gui/qml/components/main.qml +++ b/electrum/gui/qml/components/main.qml @@ -21,7 +21,8 @@ ApplicationWindow Material.primary: Material.Indigo Material.accent: Material.LightBlue - property QtObject constants: Constants {} + property Item constants: appconstants + Constants { id: appconstants } property alias stack: mainStackView