From 5065262aac9ebd70f1c8614cb794650d2a9f14e1 Mon Sep 17 00:00:00 2001 From: "vladimir.kuznetsov" Date: Thu, 24 Oct 2024 14:05:26 +0800 Subject: [PATCH] bugfix: fixed clientInfoDrawer recursive rearrange --- client/ui/qml/Pages2/PageShare.qml | 81 ++++++++++++++---------------- 1 file changed, 39 insertions(+), 42 deletions(-) diff --git a/client/ui/qml/Pages2/PageShare.qml b/client/ui/qml/Pages2/PageShare.qml index 6640df365..617b1091a 100644 --- a/client/ui/qml/Pages2/PageShare.qml +++ b/client/ui/qml/Pages2/PageShare.qml @@ -772,7 +772,8 @@ PageType { } } - anchors.fill: parent + width: root.width + height: root.height expandedContent: ColumnLayout { id: expandedContent @@ -783,8 +784,6 @@ PageType { anchors.leftMargin: 16 anchors.rightMargin: 16 - spacing: 8 - onImplicitHeightChanged: { clientInfoDrawer.expandedHeight = expandedContent.implicitHeight + 32 } @@ -797,57 +796,54 @@ PageType { } } - Header2Type { - Layout.fillWidth: true + Header2TextType { + Layout.maximumWidth: parent.width + Layout.bottomMargin: 24 - headerText: clientName + text: clientName + maximumLineCount: 2 + wrapMode: Text.Wrap + elide: Qt.ElideRight } - ColumnLayout - { - id: textColumn - property string textColor: AmneziaStyle.color.mutedGray - Layout.bottomMargin: 24 - - ParagraphTextType { - color: textColumn.textColor - visible: creationDate - Layout.fillWidth: true + ParagraphTextType { + color: AmneziaStyle.color.mutedGray + visible: creationDate + Layout.fillWidth: true - text: qsTr("Creation date: %1").arg(creationDate) - } + text: qsTr("Creation date: %1").arg(creationDate) + } - ParagraphTextType { - color: textColumn.textColor - visible: latestHandshake - Layout.fillWidth: true + ParagraphTextType { + color: AmneziaStyle.color.mutedGray + visible: latestHandshake + Layout.fillWidth: true - text: qsTr("Latest handshake: %1").arg(latestHandshake) - } + text: qsTr("Latest handshake: %1").arg(latestHandshake) + } - ParagraphTextType { - color: textColumn.textColor - visible: dataReceived - Layout.fillWidth: true + ParagraphTextType { + color: AmneziaStyle.color.mutedGray + visible: dataReceived + Layout.fillWidth: true - text: qsTr("Data received: %1").arg(dataReceived) - } + text: qsTr("Data received: %1").arg(dataReceived) + } - ParagraphTextType { - color: textColumn.textColor - visible: dataSent - Layout.fillWidth: true + ParagraphTextType { + color: AmneziaStyle.color.mutedGray + visible: dataSent + Layout.fillWidth: true - text: qsTr("Data sent: %1").arg(dataSent) - } + text: qsTr("Data sent: %1").arg(dataSent) + } - ParagraphTextType { - color: textColumn.textColor - visible: allowedIps - Layout.fillWidth: true + ParagraphTextType { + color: AmneziaStyle.color.mutedGray + visible: allowedIps + Layout.fillWidth: true - text: qsTr("Allowed IPs: %1").arg(allowedIps) - } + text: qsTr("Allowed IPs: %1").arg(allowedIps) } Item { @@ -952,6 +948,7 @@ PageType { BasicButtonType { id: revokeButton Layout.fillWidth: true + Layout.topMargin: 8 defaultColor: AmneziaStyle.color.transparent hoveredColor: AmneziaStyle.color.translucentWhite