[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [spacebar] app/package/contents/ui: [app] Auto size the message TextArea by text lines
From: Martin Klapetek <mklapetek () kde ! org>
Date: 2016-05-14 18:35:25
Message-ID: E1b1ePN-0005D3-7C () scm ! kde ! org
[Download RAW message or body]
Git commit 8f49ffbcfbc4fe6daaefd6367d80bd05b993ef3f by Martin Klapetek.
Committed on 14/05/2016 at 18:29.
Pushed by mklapetek into branch 'master'.
[app] Auto size the message TextArea by text lines
M +8 -0 app/package/contents/ui/ConversationPage.qml
http://commits.kde.org/spacebar/8f49ffbcfbc4fe6daaefd6367d80bd05b993ef3f
diff --git a/app/package/contents/ui/ConversationPage.qml b/app/package/con=
tents/ui/ConversationPage.qml
index 6299ea2..b90daa3 100644
--- a/app/package/contents/ui/ConversationPage.qml
+++ b/app/package/contents/ui/ConversationPage.qml
@@ -198,9 +198,17 @@ Kirigami.Page {
TextArea {
id: messageTextField
Layout.fillWidth: true
+ Layout.minimumHeight: sendButton.height
+ Layout.maximumHeight: lineCount * fontMetrics.lineSpac=
ing + units.largeSpacing
=
verticalScrollBarPolicy: Qt.ScrollBarAlwaysOff
horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
+ wrapMode: TextEdit.WordWrap
+
+ FontMetrics {
+ id: fontMetrics
+ font: messageTextField.font
+ }
=
Keys.onReturnPressed: {
view.model.sendNewMessage(text);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic