Browse Source

make Constants an Item and a child of main so it properly inherits material

style settings from main
patch-4
Sander van Grieken 3 years ago
parent
commit
c4c35c7cde
  1. 3
      electrum/gui/qml/components/Constants.qml
  2. 4
      electrum/gui/qml/components/RequestDialog.qml
  3. 4
      electrum/gui/qml/components/WalletMainView.qml
  4. 2
      electrum/gui/qml/components/Wallets.qml
  5. 12
      electrum/gui/qml/components/controls/InfoTextArea.qml
  6. 3
      electrum/gui/qml/components/main.qml

3
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)
}

4
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
}
}

4
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
}

2
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
}

12
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
}

3
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

Loading…
Cancel
Save