@@ -1,194 +0,0 @@
2− * Copyright (C) 2013 Canonical, Ltd.
4− * This program is free software; you can redistribute it and/or modify
5− * it under the terms of the GNU General Public License as published by
6− * the Free Software Foundation; version 3.
8− * This program is distributed in the hope that it will be useful,
9− * but WITHOUT ANY WARRANTY; without even the implied warranty of
10− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11− * GNU General Public License for more details.
13− * You should have received a copy of the GNU General Public License
14− * along with this program. If not, see <http://www.gnu.org/licenses/>.
18−import Ubuntu.Components 0.1
19−import Ubuntu.Components.ListItems 0.1 as ListItem
20−import "../../Components"
26− property alias textArea: reviewField
28− signal sendReview(string review)
37− PropertyChanges { target: reviewField; width: root.width }
38− PropertyChanges { target: sendButton; opacity: 0 }
39− PropertyChanges { target: inverseArea; enabled: false }
43− PropertyChanges { target: reviewField; width: (root.width - row.spacing - sendButton.width) }
44− PropertyChanges { target: sendButton; opacity: 1 }
45− PropertyChanges { target: inverseArea; enabled: true }
53− SequentialAnimation {
54− UbuntuNumberAnimation { target: reviewField; properties: "width"; duration: UbuntuAnimation.SlowDuration }
55− UbuntuNumberAnimation { target: sendButton; properties: "opacity"; duration: UbuntuAnimation.SlowDuration }
61− SequentialAnimation {
62− UbuntuNumberAnimation { target: sendButton; properties: "opacity"; duration: UbuntuAnimation.SlowDuration }
63− UbuntuNumberAnimation { target: reviewField; properties: "width"; duration: UbuntuAnimation.SlowDuration }
74− text: i18n.tr("Add a review")
82− // FIXME: needs to react to Qt.inputMethod geometry
85− objectName: "reviewField"
86− placeholderText: i18n.tr("Review")
88− verticalAlignment: Text.AlignVCenter
92− Behavior on height { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
95− if(reviewField.focus){
96− root.state = "editing";
97− reviewField.selectAll();
102− // FIXME: not active when in wide mode
105− anchors.fill: parent
108− reviewField.focus = false;
116− objectName: "sendButton"
119− anchors.bottom: reviewField.bottom
120− color: Theme.palette.selected.foreground
121− text: i18n.tr("Send")
125− root.sendReview(reviewField.text);
126− reviewField.text = ""
131− ListItem.ThinDivider {}
139− text: i18n.tr("Comments:")
143− objectName: "commentsArea"
147− anchors { left: parent.left; right: parent.right }
150− anchors { left: parent.left; right: parent.right }
153− anchors { left: parent.left; right: parent.right }
158− wrapMode: Text.WordWrap
164− spacing: units.gu(1)
168− rating: modelData[1]
174− color: Theme.palette.selected.backgroundText
183− anchors { left: parent.left; right: parent.right }
186− color: Theme.palette.selected.backgroundText
188− wrapMode: Text.WordWrap