Verified Commit 3ad7c5bc authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

wallpapers/potd: set maximum width of title and author labels

Layout properties should be given to Row, which contains the selectable
labels.

CCBUG: 457823
parent bd848ce4
Pipeline #217733 canceled with stage
in 40 seconds
......@@ -280,14 +280,14 @@ Kirigami.FormLayout {
// HACK: If Kirigami.FormData.label is put inside a TextArea,
// the label will not align with text in the TextArea.
Kirigami.FormData.label: i18nc("@label", "Title:")
Layout.fillWidth: true
Layout.maximumWidth: wallpaperPreview.implicitWidth * 1.5
visible: wallpaperPreview.visible && backend.title.length > 0
Kirigami.SelectableLabel {
id: titleLabel
Layout.fillWidth: true
Layout.maximumWidth: wallpaperPreview.implicitWidth * 1.5
width: parent.width
font.bold: true
text: backend.title
Accessible.name: titleLabel.Kirigami.FormData.label
......@@ -300,14 +300,14 @@ Kirigami.FormLayout {
Row {
Kirigami.FormData.label: i18nc("@label", "Author:")
Layout.fillWidth: true
Layout.maximumWidth: wallpaperPreview.implicitWidth * 1.5
visible: wallpaperPreview.visible && backend.author.length > 0
Kirigami.SelectableLabel {
id: authorLabel
Layout.fillWidth: true
Layout.maximumWidth: titleLabel.Layout.maximumWidth
width: parent.width
text: backend.author
Accessible.name: authorLabel.Kirigami.FormData.label
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment