From b3e3af4ee777db12631fed12080418de1ebfca2d Mon Sep 17 00:00:00 2001 From: Zach Fox Date: Wed, 10 Jan 2018 16:23:29 -0800 Subject: [PATCH] Add character count :) --- .../hifi/commerce/wallet/sendMoney/SendMoney.qml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/interface/resources/qml/hifi/commerce/wallet/sendMoney/SendMoney.qml b/interface/resources/qml/hifi/commerce/wallet/sendMoney/SendMoney.qml index 38d3259b49..cf80ef3816 100644 --- a/interface/resources/qml/hifi/commerce/wallet/sendMoney/SendMoney.qml +++ b/interface/resources/qml/hifi/commerce/wallet/sendMoney/SendMoney.qml @@ -833,6 +833,7 @@ Item { activeFocusOnTab: true; // Workaround for no max length on TextAreas onTextChanged: { + optionalMessageCharacterCount.text = optionalMessage.text.length + "/" + optionalMessage.maximumLength; if (text.length > maximumLength) { var cursor = cursorPosition; text = previousText; @@ -845,6 +846,20 @@ Item { previousText = text; } } + RalewaySemiBold { + id: optionalMessageCharacterCount; + // Anchors + anchors.top: optionalMessage.bottom; + anchors.topMargin: 2; + anchors.right: optionalMessage.right; + height: paintedHeight; + // Text size + size: 16; + // Style + color: hifi.colors.baseGray; + verticalAlignment: Text.AlignTop; + horizontalAlignment: Text.AlignRight; + } } Item {