1
0

qml: fix MessageDialog layout

This commit is contained in:
Sander van Grieken
2023-04-20 12:07:05 +02:00
parent 54ab3673ba
commit 1a4e48e2d4

View File

@@ -22,14 +22,20 @@ ElDialog {
padding: 0 padding: 0
width: rootLayout.width
ColumnLayout { ColumnLayout {
id: rootLayout
width: dialog.parent.width * 2/3
ColumnLayout { ColumnLayout {
visible: text visible: text
Layout.margins: constants.paddingMedium Layout.margins: constants.paddingMedium
Layout.alignment: Qt.AlignHCenter Layout.fillWidth: true
TextArea { TextArea {
id: message id: message
Layout.preferredWidth: dialog.parent.width * 2/3 Layout.fillWidth: true
readOnly: true readOnly: true
wrapMode: TextInput.WordWrap wrapMode: TextInput.WordWrap
textFormat: richText ? TextEdit.RichText : TextEdit.PlainText textFormat: richText ? TextEdit.RichText : TextEdit.PlainText
@@ -40,7 +46,7 @@ ElDialog {
} }
ButtonContainer { ButtonContainer {
Layout.preferredWidth: dialog.parent.width * 2/3 Layout.fillWidth: true
FlatButton { FlatButton {
Layout.fillWidth: true Layout.fillWidth: true