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 {
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
}
}

View File

@ -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
}
}

View File

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