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 2.6
|
||||||
import QtQuick.Controls.Material 2.0
|
import QtQuick.Controls.Material 2.0
|
||||||
|
|
||||||
QtObject {
|
Item {
|
||||||
readonly property int paddingTiny: 4
|
readonly property int paddingTiny: 4
|
||||||
readonly property int paddingSmall: 8
|
readonly property int paddingSmall: 8
|
||||||
readonly property int paddingMedium: 12
|
readonly property int paddingMedium: 12
|
||||||
@@ -24,4 +24,5 @@ QtObject {
|
|||||||
|
|
||||||
property color colorCredit: "#ff80ff80"
|
property color colorCredit: "#ff80ff80"
|
||||||
property color colorDebit: "#ffff8080"
|
property color colorDebit: "#ffff8080"
|
||||||
|
property color mutedForeground: Qt.lighter(Material.background, 2)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ Dialog {
|
|||||||
text: dialog.title
|
text: dialog.title
|
||||||
visible: dialog.title
|
visible: dialog.title
|
||||||
elide: Label.ElideRight
|
elide: Label.ElideRight
|
||||||
padding: 24
|
padding: constants.paddingXLarge
|
||||||
bottomPadding: 0
|
bottomPadding: 0
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: 16
|
font.pixelSize: constants.fontSizeMedium
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,12 +53,12 @@ Item {
|
|||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
width: parent.width
|
width: parent.width
|
||||||
spacing: 40
|
spacing: 2*constants.paddingXLarge
|
||||||
visible: Daemon.currentWallet == null
|
visible: Daemon.currentWallet == null
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: qsTr('No wallet loaded')
|
text: qsTr('No wallet loaded')
|
||||||
font.pixelSize: 24
|
font.pixelSize: constants.fontSizeXXLarge
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ Pane {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
font.pixelSize: 18
|
font.pixelSize: constants.fontSizeLarge
|
||||||
text: model.name
|
text: model.name
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,8 +28,8 @@ GridLayout {
|
|||||||
id: infotext
|
id: infotext
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
readOnly: true
|
readOnly: true
|
||||||
rightPadding: 16
|
rightPadding: constants.paddingLarge
|
||||||
leftPadding: 64
|
leftPadding: 2*constants.iconSizeLarge
|
||||||
wrapMode: TextInput.WordWrap
|
wrapMode: TextInput.WordWrap
|
||||||
textFormat: TextEdit.RichText
|
textFormat: TextEdit.RichText
|
||||||
background: Rectangle {
|
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" : ""
|
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.left: parent.left
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.leftMargin: 16
|
anchors.leftMargin: constants.paddingLarge
|
||||||
anchors.topMargin: 16
|
anchors.topMargin: constants.paddingLarge
|
||||||
height: 32
|
height: constants.iconSizeLarge
|
||||||
width: 32
|
width: constants.iconSizeLarge
|
||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ ApplicationWindow
|
|||||||
Material.primary: Material.Indigo
|
Material.primary: Material.Indigo
|
||||||
Material.accent: Material.LightBlue
|
Material.accent: Material.LightBlue
|
||||||
|
|
||||||
property QtObject constants: Constants {}
|
property Item constants: appconstants
|
||||||
|
Constants { id: appconstants }
|
||||||
|
|
||||||
property alias stack: mainStackView
|
property alias stack: mainStackView
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user