Set WrapMode on TextArea component

Upstream styles do not provide any wrapping by default, and thus we
should not rely on deceptively convenient override in qqc2-desktop-style.

See https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/331
This commit is contained in:
ivan tkachenko 2023-11-28 04:21:21 +03:00
parent b19267598e
commit ba9acbc735
No known key found for this signature in database
GPG key ID: AF72731B7C654CB3

View file

@ -352,6 +352,7 @@ PlasmaComponents.ListItem
PlasmaComponents3.TextArea { PlasmaComponents3.TextArea {
id: replyTextField id: replyTextField
placeholderText: i18nc("@info:placeholder", "Reply to %1…", appName) placeholderText: i18nc("@info:placeholder", "Reply to %1…", appName)
wrapMode: TextEdit.Wrap
Layout.fillWidth: true Layout.fillWidth: true
Keys.onPressed: { Keys.onPressed: {
if ((event.key == Qt.Key_Return || event.key == Qt.Key_Enter) && !(event.modifiers & Qt.ShiftModifier)) { if ((event.key == Qt.Key_Return || event.key == Qt.Key_Enter) && !(event.modifiers & Qt.ShiftModifier)) {