fix(ConnectDAppModal): add scrolling
- wrap the contents into a scroll view and don't hardcode the height Fixes #15592
This commit is contained in:
parent
8046bfeb6b
commit
0e0b264f4d
|
@ -65,7 +65,6 @@ Item {
|
|||
verify(dappModal.flatNetworks, "ConnectDAppModal should have networks")
|
||||
|
||||
compare(dappModal.width, 480)
|
||||
compare(dappModal.height, 633)
|
||||
compare(dappModal.dAppName, "")
|
||||
compare(dappModal.dAppUrl, "")
|
||||
compare(dappModal.dAppIconUrl, "")
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtQml.Models 2.14
|
||||
import QtQml.Models 2.15
|
||||
import SortFilterProxyModel 0.2
|
||||
|
||||
import QtGraphicalEffects 1.15
|
||||
|
||||
import StatusQ 0.1
|
||||
import StatusQ.Core 0.1
|
||||
import StatusQ.Core.Utils 0.1
|
||||
|
@ -93,18 +91,25 @@ StatusDialog {
|
|||
signal disconnect()
|
||||
|
||||
width: 480
|
||||
implicitHeight: !d.connectionAttempted ? 633 : 681
|
||||
|
||||
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
|
||||
|
||||
title: d.connectionSuccessful ? qsTr("dApp connected") :
|
||||
qsTr("Connection request")
|
||||
|
||||
padding: 20
|
||||
padding: 0
|
||||
|
||||
contentItem: ColumnLayout {
|
||||
StatusScrollView {
|
||||
id: scrollView
|
||||
anchors.fill: parent
|
||||
contentWidth: availableWidth
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 20
|
||||
clip: true
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 4
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 4
|
||||
|
||||
DAppCard {
|
||||
id: dappCard
|
||||
|
@ -145,6 +150,7 @@ StatusDialog {
|
|||
dappName: dappCard.name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
footer: StatusDialogFooter {
|
||||
id: footer
|
||||
|
@ -172,9 +178,7 @@ StatusDialog {
|
|||
StatusButton {
|
||||
objectName: "primaryActionButton"
|
||||
height: 44
|
||||
text: d.connectionAttempted
|
||||
? qsTr("Close")
|
||||
: qsTr("Connect")
|
||||
text: d.connectionAttempted ? qsTr("Close") : qsTr("Connect")
|
||||
enabled: {
|
||||
if (!d.connectionAttempted)
|
||||
return root.selectedChains.length > 0
|
||||
|
|
Loading…
Reference in New Issue