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
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 {
id: layout
Layout.preferredWidth: parent.width - 2*constants.paddingLarge
Layout.leftMargin: constants.paddingLarge
Layout.rightMargin: constants.paddingLarge
id: rootLayout
width: parent.width
columns: 2
Label {
@ -144,8 +153,7 @@ ElDialog {
}
}
}
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
}
FlatButton {
Layout.columnSpan: 2

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

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

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

@ -29,11 +29,20 @@ ElDialog {
anchors.fill: parent
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 {
id: form
Layout.fillWidth: true
Layout.leftMargin: constants.paddingLarge
Layout.rightMargin: constants.paddingLarge
id: rootLayout
width: parent.width
columns: 4
@ -156,8 +165,7 @@ ElDialog {
Item { visible: Daemon.fx.enabled ; height: 1; width: 1 }
}
Item { Layout.fillHeight: true; Layout.preferredWidth: 1 }
}
FlatButton {
Layout.fillWidth: true

Loading…
Cancel
Save