1
0

UI use constants

This commit is contained in:
Sander van Grieken
2022-03-30 21:19:11 +02:00
parent 2229322beb
commit 1c7f559f32
4 changed files with 18 additions and 15 deletions

View File

@@ -19,4 +19,6 @@ QtObject {
readonly property int iconSizeSmall: 16
readonly property int iconSizeMedium: 24
readonly property int iconSizeLarge: 32
readonly property int iconSizeXLarge: 48
readonly property int iconSizeXXLarge: 64
}

View File

@@ -46,7 +46,7 @@ Dialog {
}
GridLayout {
width: parent.width
rowSpacing: constants.paddingMedium
rowSpacing: constants.paddingXLarge
columns: 3
Rectangle {
@@ -62,7 +62,7 @@ Dialog {
source: 'image://qrgen/' + modelItem.address
Rectangle {
property int size: 58
property int size: 57 // should be qr pixel multiple
color: 'white'
x: (parent.width - size) / 2
y: (parent.height - size) / 2
@@ -75,6 +75,7 @@ Dialog {
y: 1
width: parent.width - 2
height: parent.height - 2
scale: 0.9
}
}
}

View File

@@ -98,10 +98,10 @@ WizardComponent {
id: contentText
anchors.right: parent.right
anchors.bottom: parent.bottom
leftPadding: text != '' ? 16 : 0
rightPadding: text != '' ? 16 : 0
leftPadding: text != '' ? constants.paddingLarge : 0
rightPadding: text != '' ? constants.paddingLarge : 0
font.bold: false
font.pixelSize: 13
font.pixelSize: constants.fontSizeSmall
}
}
TextArea {

View File

@@ -135,28 +135,28 @@ Dialog {
Image {
source: "../../../icons/electrum.png"
Layout.preferredWidth: 48
Layout.preferredHeight: 48
Layout.leftMargin: 12
Layout.topMargin: 12
Layout.bottomMargin: 12
Layout.preferredWidth: constants.iconSizeXLarge
Layout.preferredHeight: constants.iconSizeXLarge
Layout.leftMargin: constants.paddingMedium
Layout.topMargin: constants.paddingMedium
Layout.bottomMargin: constants.paddingMedium
}
Label {
text: title
elide: Label.ElideRight
Layout.fillWidth: true
topPadding: 24
bottomPadding: 24
topPadding: constants.paddingXLarge
bottomPadding: constants.paddingXLarge
font.bold: true
font.pixelSize: 16
font.pixelSize: constants.fontSizeMedium
}
Rectangle {
Layout.columnSpan: 2
Layout.fillWidth: true
Layout.leftMargin: 4
Layout.rightMargin: 4
Layout.leftMargin: constants.paddingTiny
Layout.rightMargin: constants.paddingTiny
height: 1
color: Qt.rgba(0,0,0,0.5)
}