Browse Source

qml: make dialog content flickable for small displays for CloseChannelDialog, OpemChannelDialog and InvoiceDialog

master
Sander van Grieken 3 years ago
parent
commit
90d64a004b
  1. 20
      electrum/gui/qml/components/CloseChannelDialog.qml
  2. 22
      electrum/gui/qml/components/InvoiceDialog.qml
  3. 20
      electrum/gui/qml/components/OpenChannelDialog.qml

20
electrum/gui/qml/components/CloseChannelDialog.qml

@ -32,11 +32,20 @@ ElDialog {
anchors.fill: parent anchors.fill: parent
spacing: 0 spacing: 0
Flickable {
Layout.preferredWidth: parent.width
Layout.fillHeight: true
leftMargin: constants.paddingLarge
rightMargin: constants.paddingLarge
contentHeight: rootLayout.height
clip:true
interactive: height < contentHeight
GridLayout { GridLayout {
id: layout id: rootLayout
Layout.preferredWidth: parent.width - 2*constants.paddingLarge width: parent.width
Layout.leftMargin: constants.paddingLarge
Layout.rightMargin: constants.paddingLarge
columns: 2 columns: 2
Label { Label {
@ -144,8 +153,7 @@ ElDialog {
} }
} }
} }
}
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
FlatButton { FlatButton {
Layout.columnSpan: 2 Layout.columnSpan: 2

22
electrum/gui/qml/components/InvoiceDialog.qml

@ -30,15 +30,24 @@ ElDialog {
property bool _canMax: invoice.invoiceType == Invoice.OnchainInvoice property bool _canMax: invoice.invoiceType == Invoice.OnchainInvoice
ColumnLayout { ColumnLayout {
width: parent.width anchors.fill: parent
height: parent.height
spacing: 0 spacing: 0
Flickable {
Layout.preferredWidth: parent.width
Layout.fillHeight: true
leftMargin: constants.paddingLarge
rightMargin: constants.paddingLarge
contentHeight: rootLayout.height
clip:true
interactive: height < contentHeight
GridLayout { GridLayout {
id: layout id: rootLayout
width: parent.width width: parent.width
Layout.leftMargin: constants.paddingLarge
Layout.rightMargin: constants.paddingLarge
columns: 2 columns: 2
Label { Label {
@ -326,8 +335,7 @@ ElDialog {
text: invoice.userinfo text: invoice.userinfo
} }
} }
}
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
FlatButton { FlatButton {
Layout.fillWidth: true Layout.fillWidth: true

20
electrum/gui/qml/components/OpenChannelDialog.qml

@ -29,11 +29,20 @@ ElDialog {
anchors.fill: parent anchors.fill: parent
spacing: 0 spacing: 0
Flickable {
Layout.preferredWidth: parent.width
Layout.fillHeight: true
leftMargin: constants.paddingLarge
rightMargin: constants.paddingLarge
contentHeight: rootLayout.height
clip:true
interactive: height < contentHeight
GridLayout { GridLayout {
id: form id: rootLayout
Layout.fillWidth: true width: parent.width
Layout.leftMargin: constants.paddingLarge
Layout.rightMargin: constants.paddingLarge
columns: 4 columns: 4
@ -156,8 +165,7 @@ ElDialog {
Item { visible: Daemon.fx.enabled ; height: 1; width: 1 } Item { visible: Daemon.fx.enabled ; height: 1; width: 1 }
} }
}
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
FlatButton { FlatButton {
Layout.fillWidth: true Layout.fillWidth: true

Loading…
Cancel
Save