Browse Source

UI use constants

patch-4
Sander van Grieken 3 years ago
parent
commit
1c7f559f32
  1. 2
      electrum/gui/qml/components/Constants.qml
  2. 5
      electrum/gui/qml/components/RequestDialog.qml
  3. 6
      electrum/gui/qml/components/wizard/WCHaveSeed.qml
  4. 20
      electrum/gui/qml/components/wizard/Wizard.qml

2
electrum/gui/qml/components/Constants.qml

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

5
electrum/gui/qml/components/RequestDialog.qml

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

6
electrum/gui/qml/components/wizard/WCHaveSeed.qml

@ -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 {

20
electrum/gui/qml/components/wizard/Wizard.qml

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

Loading…
Cancel
Save