From ac1adcea329e9aa3018c3658297562d93b2cec7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= Date: Mon, 2 Oct 2023 14:20:15 +0200 Subject: [PATCH] fix(sharding): use StatusTextArea for multiline readonly text --- .../popups/EnableShardingPopup.qml | 17 ++++++----- .../popups/ManageShardingPopup.qml | 28 ++++++++++++------- .../shared/popups/ImportCommunityPopup.qml | 2 +- 3 files changed, 29 insertions(+), 18 deletions(-) diff --git a/ui/app/AppLayouts/Communities/popups/EnableShardingPopup.qml b/ui/app/AppLayouts/Communities/popups/EnableShardingPopup.qml index 8b3c13432c..a9a4a5a874 100644 --- a/ui/app/AppLayouts/Communities/popups/EnableShardingPopup.qml +++ b/ui/app/AppLayouts/Communities/popups/EnableShardingPopup.qml @@ -99,20 +99,23 @@ StatusStackModal { ColumnLayout { readonly property bool canGoNext: agreement.checked - StatusInput { + StatusBaseText { + text: qsTr("Pub/Sub topic") + } + + StatusTextArea { Layout.fillWidth: true - minimumHeight: 88 - maximumHeight: 88 - multiline: true - input.edit.readOnly: true - label: qsTr("Pub/Sub topic") + Layout.preferredHeight: 138 + readOnly: true text: d.pubSubTopic + rightPadding: 48 + wrapMode: TextEdit.Wrap CopyButton { anchors.right: parent.right anchors.top: parent.top anchors.rightMargin: 12 - anchors.topMargin: (parent.height - parent.input.height) + 12 + anchors.topMargin: 10 textToCopy: parent.text } } diff --git a/ui/app/AppLayouts/Communities/popups/ManageShardingPopup.qml b/ui/app/AppLayouts/Communities/popups/ManageShardingPopup.qml index 3501af0935..a2b55d2e0c 100644 --- a/ui/app/AppLayouts/Communities/popups/ManageShardingPopup.qml +++ b/ui/app/AppLayouts/Communities/popups/ManageShardingPopup.qml @@ -46,27 +46,35 @@ StatusDialog { contentItem: ColumnLayout { spacing: Style.current.halfPadding - StatusInput { + + StatusBaseText { + text: qsTr("Shard number") + } + + StatusTextArea { Layout.fillWidth: true - label: qsTr("Shard number") - input.edit.readOnly: true + readOnly: true text: root.shardIndex } - StatusInput { + StatusBaseText { + Layout.topMargin: Style.current.halfPadding + text: qsTr("Pub/Sub topic") + } + + StatusTextArea { Layout.fillWidth: true - minimumHeight: 88 - maximumHeight: 88 - multiline: true - input.edit.readOnly: true - label: qsTr("Pub/Sub topic") + Layout.preferredHeight: 138 + readOnly: true text: root.pubSubTopic + rightPadding: 48 + wrapMode: TextEdit.Wrap CopyButton { anchors.right: parent.right anchors.top: parent.top anchors.rightMargin: 12 - anchors.topMargin: (parent.height - parent.input.height) + 12 + anchors.topMargin: 10 textToCopy: parent.text } } diff --git a/ui/imports/shared/popups/ImportCommunityPopup.qml b/ui/imports/shared/popups/ImportCommunityPopup.qml index d5a1c6aa55..ed926d35a8 100644 --- a/ui/imports/shared/popups/ImportCommunityPopup.qml +++ b/ui/imports/shared/popups/ImportCommunityPopup.qml @@ -107,7 +107,7 @@ StatusDialog { StatusTextArea { id: keyInput Layout.fillWidth: true - implicitHeight: 108 + Layout.preferredHeight: 108 placeholderText: "0x0..." wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere onTextChanged: d.importErrorMessage = ""