make Constants an Item and a child of main so it properly inherits material
style settings from main
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ Pane {
|
||||
}
|
||||
|
||||
Label {
|
||||
font.pixelSize: 18
|
||||
font.pixelSize: constants.fontSizeLarge
|
||||
text: model.name
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user