Merge pull request #1124 from amnezia-vpn/bugfix/page-share-recursive-rearrange

bugfix: fixed clientInfoDrawer.expandedHeight recursive rearrange
This commit is contained in:
pokamest 2024-10-24 16:39:04 +01:00 committed by GitHub
commit 2946dd2278
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -772,7 +772,8 @@ PageType {
} }
} }
anchors.fill: parent width: root.width
height: root.height
expandedContent: ColumnLayout { expandedContent: ColumnLayout {
id: expandedContent id: expandedContent
@ -783,8 +784,6 @@ PageType {
anchors.leftMargin: 16 anchors.leftMargin: 16
anchors.rightMargin: 16 anchors.rightMargin: 16
spacing: 8
onImplicitHeightChanged: { onImplicitHeightChanged: {
clientInfoDrawer.expandedHeight = expandedContent.implicitHeight + 32 clientInfoDrawer.expandedHeight = expandedContent.implicitHeight + 32
} }
@ -797,20 +796,18 @@ PageType {
} }
} }
Header2Type { Header2TextType {
Layout.fillWidth: true Layout.maximumWidth: parent.width
headerText: clientName
}
ColumnLayout
{
id: textColumn
property string textColor: AmneziaStyle.color.mutedGray
Layout.bottomMargin: 24 Layout.bottomMargin: 24
text: clientName
maximumLineCount: 2
wrapMode: Text.Wrap
elide: Qt.ElideRight
}
ParagraphTextType { ParagraphTextType {
color: textColumn.textColor color: AmneziaStyle.color.mutedGray
visible: creationDate visible: creationDate
Layout.fillWidth: true Layout.fillWidth: true
@ -818,7 +815,7 @@ PageType {
} }
ParagraphTextType { ParagraphTextType {
color: textColumn.textColor color: AmneziaStyle.color.mutedGray
visible: latestHandshake visible: latestHandshake
Layout.fillWidth: true Layout.fillWidth: true
@ -826,7 +823,7 @@ PageType {
} }
ParagraphTextType { ParagraphTextType {
color: textColumn.textColor color: AmneziaStyle.color.mutedGray
visible: dataReceived visible: dataReceived
Layout.fillWidth: true Layout.fillWidth: true
@ -834,7 +831,7 @@ PageType {
} }
ParagraphTextType { ParagraphTextType {
color: textColumn.textColor color: AmneziaStyle.color.mutedGray
visible: dataSent visible: dataSent
Layout.fillWidth: true Layout.fillWidth: true
@ -842,13 +839,12 @@ PageType {
} }
ParagraphTextType { ParagraphTextType {
color: textColumn.textColor color: AmneziaStyle.color.mutedGray
visible: allowedIps visible: allowedIps
Layout.fillWidth: true Layout.fillWidth: true
text: qsTr("Allowed IPs: %1").arg(allowedIps) text: qsTr("Allowed IPs: %1").arg(allowedIps)
} }
}
Item { Item {
id: focusItem1 id: focusItem1
@ -952,6 +948,7 @@ PageType {
BasicButtonType { BasicButtonType {
id: revokeButton id: revokeButton
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 8
defaultColor: AmneziaStyle.color.transparent defaultColor: AmneziaStyle.color.transparent
hoveredColor: AmneziaStyle.color.translucentWhite hoveredColor: AmneziaStyle.color.translucentWhite