Browse Source

qml: layout fixes for small form-factor devices

master
Sander van Grieken 3 years ago
parent
commit
a5c58f8aae
  1. 23
      electrum/gui/qml/components/CpfpBumpFeeDialog.qml
  2. 29
      electrum/gui/qml/components/RbfBumpFeeDialog.qml
  3. 24
      electrum/gui/qml/components/RbfCancelDialog.qml

23
electrum/gui/qml/components/CpfpBumpFeeDialog.qml

@ -26,10 +26,21 @@ ElDialog {
anchors.fill: parent
spacing: 0
Flickable {
Layout.fillWidth: true
Layout.fillHeight: true
leftMargin: constants.paddingLarge
rightMargin: constants.paddingLarge
contentHeight: rootLayout.height
clip: true
interactive: height < contentHeight
GridLayout {
Layout.preferredWidth: parent.width
Layout.leftMargin: constants.paddingLarge
Layout.rightMargin: constants.paddingLarge
id: rootLayout
width: parent.width
columns: 2
Label {
@ -79,6 +90,8 @@ ElDialog {
valid: cpfpfeebumper.valid
}
RowLayout {
Layout.columnSpan: 2
Slider {
id: feeslider
leftPadding: constants.paddingMedium
@ -105,6 +118,7 @@ ElDialog {
id: feemethod
feeslider: cpfpfeebumper
}
}
Label {
visible: feemethod.currentValue
@ -202,8 +216,7 @@ ElDialog {
}
}
}
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
}
FlatButton {
id: sendButton

29
electrum/gui/qml/components/RbfBumpFeeDialog.qml

@ -26,10 +26,22 @@ ElDialog {
anchors.fill: parent
spacing: 0
Flickable {
Layout.fillWidth: true
Layout.fillHeight: true
leftMargin: constants.paddingLarge
rightMargin: constants.paddingLarge
contentHeight: rootLayout.height
clip: true
interactive: height < contentHeight
GridLayout {
Layout.preferredWidth: parent.width
Layout.leftMargin: constants.paddingLarge
Layout.rightMargin: constants.paddingLarge
id: rootLayout
width: parent.width
columns: 2
Label {
@ -49,7 +61,10 @@ ElDialog {
RowLayout {
Layout.preferredWidth: 1
Layout.fillWidth: true
Layout.minimumWidth: bumpMethodComboBox.implicitWidth
ElComboBox {
id: bumpMethodComboBox
enabled: rbffeebumper.canChangeBumpMethod
textRole: 'text'
@ -142,10 +157,8 @@ ElDialog {
RowLayout {
Layout.columnSpan: 2
Layout.fillWidth: true
Slider {
id: feeslider
Layout.fillWidth: true
leftPadding: constants.paddingMedium
snapMode: Slider.SnapOnRelease
stepSize: 1
@ -174,8 +187,7 @@ ElDialog {
InfoTextArea {
Layout.columnSpan: 2
Layout.preferredWidth: parent.width * 3/4
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
visible: rbffeebumper.warning != ''
text: rbffeebumper.warning
iconStyle: InfoTextArea.IconStyle.Warn
@ -218,8 +230,7 @@ ElDialog {
}
}
}
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
}
FlatButton {
id: sendButton

24
electrum/gui/qml/components/RbfCancelDialog.qml

@ -25,11 +25,20 @@ ElDialog {
anchors.fill: parent
spacing: 0
GridLayout {
Flickable {
Layout.fillWidth: true
Layout.leftMargin: constants.paddingLarge
Layout.rightMargin: constants.paddingLarge
Layout.fillHeight: true
leftMargin: constants.paddingLarge
rightMargin: constants.paddingLarge
contentHeight: rootLayout.height
clip: true
interactive: height < contentHeight
GridLayout {
id: rootLayout
width: parent.width
columns: 2
Label {
@ -105,6 +114,8 @@ ElDialog {
text: txcanceller.target
}
RowLayout {
Layout.columnSpan: 2
Slider {
id: feeslider
leftPadding: constants.paddingMedium
@ -131,6 +142,7 @@ ElDialog {
id: target
feeslider: txcanceller
}
}
CheckBox {
id: final_cb
@ -145,8 +157,7 @@ ElDialog {
InfoTextArea {
Layout.columnSpan: 2
Layout.preferredWidth: parent.width * 3/4
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
visible: txcanceller.warning != ''
text: txcanceller.warning
iconStyle: InfoTextArea.IconStyle.Warn
@ -189,8 +200,7 @@ ElDialog {
}
}
}
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
}
FlatButton {
id: confirmButton

Loading…
Cancel
Save