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

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

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

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

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

Loading…
Cancel
Save