fix(sharding): use StatusTextArea for multiline readonly text

This commit is contained in:
Lukáš Tinkl 2023-10-02 14:20:15 +02:00 committed by Lukáš Tinkl
parent 6162c3f63a
commit ac1adcea32
3 changed files with 29 additions and 18 deletions

View File

@ -99,20 +99,23 @@ StatusStackModal {
ColumnLayout { ColumnLayout {
readonly property bool canGoNext: agreement.checked readonly property bool canGoNext: agreement.checked
StatusInput { StatusBaseText {
text: qsTr("Pub/Sub topic")
}
StatusTextArea {
Layout.fillWidth: true Layout.fillWidth: true
minimumHeight: 88 Layout.preferredHeight: 138
maximumHeight: 88 readOnly: true
multiline: true
input.edit.readOnly: true
label: qsTr("Pub/Sub topic")
text: d.pubSubTopic text: d.pubSubTopic
rightPadding: 48
wrapMode: TextEdit.Wrap
CopyButton { CopyButton {
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.topMargin: (parent.height - parent.input.height) + 12 anchors.topMargin: 10
textToCopy: parent.text textToCopy: parent.text
} }
} }

View File

@ -46,27 +46,35 @@ StatusDialog {
contentItem: ColumnLayout { contentItem: ColumnLayout {
spacing: Style.current.halfPadding spacing: Style.current.halfPadding
StatusInput {
StatusBaseText {
text: qsTr("Shard number")
}
StatusTextArea {
Layout.fillWidth: true Layout.fillWidth: true
label: qsTr("Shard number") readOnly: true
input.edit.readOnly: true
text: root.shardIndex text: root.shardIndex
} }
StatusInput { StatusBaseText {
Layout.topMargin: Style.current.halfPadding
text: qsTr("Pub/Sub topic")
}
StatusTextArea {
Layout.fillWidth: true Layout.fillWidth: true
minimumHeight: 88 Layout.preferredHeight: 138
maximumHeight: 88 readOnly: true
multiline: true
input.edit.readOnly: true
label: qsTr("Pub/Sub topic")
text: root.pubSubTopic text: root.pubSubTopic
rightPadding: 48
wrapMode: TextEdit.Wrap
CopyButton { CopyButton {
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
anchors.rightMargin: 12 anchors.rightMargin: 12
anchors.topMargin: (parent.height - parent.input.height) + 12 anchors.topMargin: 10
textToCopy: parent.text textToCopy: parent.text
} }
} }

View File

@ -107,7 +107,7 @@ StatusDialog {
StatusTextArea { StatusTextArea {
id: keyInput id: keyInput
Layout.fillWidth: true Layout.fillWidth: true
implicitHeight: 108 Layout.preferredHeight: 108
placeholderText: "0x0..." placeholderText: "0x0..."
wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere wrapMode: TextEdit.WrapAtWordBoundaryOrAnywhere
onTextChanged: d.importErrorMessage = "" onTextChanged: d.importErrorMessage = ""