fix: make Kirigami relayout the unlock accounts page with proper word wrapping for the banner text

This is a hack/work-around for a deficiency in Kirigami pending a proper fix upstream.

See-Also: https://invent.kde.org/frameworks/kirigami/-/merge_requests/159
master
Carl Schwan 2020-11-11 13:58:18 +01:00 committed by Johan Ouwerkerk
parent cda7ace071
commit d440689e99
1 changed files with 11 additions and 0 deletions

View File

@ -26,8 +26,19 @@ Kirigami.ScrollablePage {
showCloseButton: true
type: Kirigami.MessageType.Error
}
// HACK remove when depends on Kirigami 5.77
Component.onCompleted: {
for (var index in form.children[0].children) {
var item = form.children[0].children[index];
if (item instanceof Text) {
item.wrapMode = item.Text.Wrap
}
item.Layout.fillWidth = true;
}
}
Kirigami.FormLayout {
id: form
Item {
Kirigami.FormData.isSection: true
Kirigami.FormData.label: i18n("Please provide the password to unlock your accounts")