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 iconSizeSmall: 16
readonly property int iconSizeMedium: 24 readonly property int iconSizeMedium: 24
readonly property int iconSizeLarge: 32 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 { GridLayout {
width: parent.width width: parent.width
rowSpacing: constants.paddingMedium rowSpacing: constants.paddingXLarge
columns: 3 columns: 3
Rectangle { Rectangle {
@ -62,7 +62,7 @@ Dialog {
source: 'image://qrgen/' + modelItem.address source: 'image://qrgen/' + modelItem.address
Rectangle { Rectangle {
property int size: 58 property int size: 57 // should be qr pixel multiple
color: 'white' color: 'white'
x: (parent.width - size) / 2 x: (parent.width - size) / 2
y: (parent.height - size) / 2 y: (parent.height - size) / 2
@ -75,6 +75,7 @@ Dialog {
y: 1 y: 1
width: parent.width - 2 width: parent.width - 2
height: parent.height - 2 height: parent.height - 2
scale: 0.9
} }
} }
} }

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

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

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

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

Loading…
Cancel
Save