[SMS App] Make SMS character counter width only grow

SMS character counter was changing its width (both growing and
shrinking) so it also resized message field (and that caused text
reflow). This patch makes counter width only grow.

Type SMS that is long enough to make SMS character counter wider than
“Send” button. Remove the text (leave there 150 or 60 chars to keep it
visible). Character counter should keep its width.
This commit is contained in:
Jiří Wolker 2020-03-23 12:37:16 +01:00 committed by Simon Redman
parent b59ef618b2
commit 6abe790aa4

View file

@ -263,6 +263,7 @@ Kirigami.ScrollablePage
id: "charCount" id: "charCount"
text: conversationModel.getCharCountInfo(messageField.text) text: conversationModel.getCharCountInfo(messageField.text)
visible: text.length > 0 visible: text.length > 0
Layout.minimumWidth: Math.max(Layout.minimumWidth, width) // Make this label only grow, never shrink
} }
} }
} }