From abae8157772931506fd2e3062d5dd7843d377e22 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Thu, 23 Mar 2023 10:56:42 +0100 Subject: [PATCH] qml: TxDetails small form-factor fix, wrap buttons to below fee-bump text if width is constrained --- electrum/gui/qml/components/TxDetails.qml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/electrum/gui/qml/components/TxDetails.qml b/electrum/gui/qml/components/TxDetails.qml index 8c40c56fc..68e6894e4 100644 --- a/electrum/gui/qml/components/TxDetails.qml +++ b/electrum/gui/qml/components/TxDetails.qml @@ -138,17 +138,23 @@ Pane { borderColor: constants.colorWarning visible: txdetails.canBump || txdetails.canCpfp || txdetails.canCancel - RowLayout { + GridLayout { width: parent.width + columns: actionButtonsLayout.implicitWidth > parent.width/2 + ? 1 + : 2 Label { Layout.fillWidth: true - text: qsTr('This transaction is still unconfirmed.') + '\n' + - qsTr('You can increase fees to speed up the transaction, or cancel this transaction') + text: qsTr('This transaction is still unconfirmed.') + '\n' + (txdetails.canCancel + ? qsTr('You can increase fees to speed up the transaction, or cancel this transaction') + : qsTr('You can increase fees to speed up the transaction')) wrapMode: Text.Wrap } ColumnLayout { + id: actionButtonsLayout Layout.alignment: Qt.AlignHCenter Pane { + Layout.alignment: Qt.AlignHCenter background: Rectangle { color: Material.dialogColor } padding: 0 visible: txdetails.canBump || txdetails.canCpfp @@ -168,6 +174,7 @@ Pane { } } Pane { + Layout.alignment: Qt.AlignHCenter background: Rectangle { color: Material.dialogColor } padding: 0 visible: txdetails.canCancel