From d7c5ef1a7ea211635bb865aa63e59b6f6505d2ea Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Thu, 16 Oct 2014 10:22:21 +0200 Subject: Fixes in Feedback page - Use TextArea instead of TextEdit - Add cliping to the TextArea - Increase rating stars size Change-Id: Ia2104c0b57605c22d3a7693e37d7c6af9ddbeec6 Reviewed-by: Niels Weber --- qml/components/Feedback.qml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'qml') diff --git a/qml/components/Feedback.qml b/qml/components/Feedback.qml index 3c726c4..fa0cb70 100644 --- a/qml/components/Feedback.qml +++ b/qml/components/Feedback.qml @@ -60,11 +60,14 @@ Item { } Column { + id: columnFeedback anchors.top: subTitle.bottom anchors.left: parent.left anchors.right: parent.right anchors.margins: Theme.margins.twenty spacing: Theme.margins.fifteen + property bool hasReview: (feedbackEdit.text !== Theme.text.writeYourCommentHere && feedbackEdit.text !== "") + || rating > -1 Text { text: eventTopic color: Theme.colors.black @@ -117,20 +120,20 @@ Item { color: Theme.colors.gray } } - - Rectangle { + TextArea { + id: feedbackEdit height: window.height / 3 width: parent.width - TextEdit { - id: feedbackEdit - anchors.fill: parent - textMargin: Theme.margins.ten - wrapMode: TextEdit.Wrap - onFocusChanged: if (focus && text === Theme.text.writeYourCommentHere) text = "" - color: text === Theme.text.writeYourCommentHere ? Theme.colors.gray : Theme.colors.black - font.pointSize: Theme.fonts.seven_pt - Component.onCompleted: text = Theme.text.writeYourCommentHere - } + frameVisible: true + textMargin: Theme.margins.ten + inputMethodHints: Qt.platform.os === "ios" ? Qt.ImhNoPredictiveText : Qt.ImhNone + wrapMode: TextEdit.Wrap + onFocusChanged: if (focus && text === Theme.text.writeYourCommentHere) text = "" + textColor: text === Theme.text.writeYourCommentHere ? Theme.colors.gray : Theme.colors.black + font.pointSize: Theme.fonts.seven_pt + Component.onCompleted: text = Theme.text.writeYourCommentHere + selectByMouse: true + clip: true } Row { spacing: Theme.margins.twenty @@ -161,8 +164,7 @@ Item { } Button { text: "Send" - enabled: (feedbackEdit.text !== Theme.text.writeYourCommentHere && feedbackEdit.text !== "") - || rating > -1 + enabled: columnFeedback.hasReview onClicked: { text = "sending..." Qt.inputMethod.hide() -- cgit v1.2.3