diff options
author | Caroline Chao <caroline.chao@digia.com> | 2014-10-16 10:22:21 +0200 |
---|---|---|
committer | Niels Weber <niels.weber@digia.com> | 2014-10-17 12:13:26 +0200 |
commit | d7c5ef1a7ea211635bb865aa63e59b6f6505d2ea (patch) | |
tree | 5a6ef9f1d665e1008f7f6b7d7a923a5a34d75da8 /qml | |
parent | 5fe68d5ff7da88e84af78441648ca65dccd14c83 (diff) |
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 <niels.weber@digia.com>
Diffstat (limited to 'qml')
-rw-r--r-- | qml/components/Feedback.qml | 30 |
1 files changed, 16 insertions, 14 deletions
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() |