@@ -25,8 +25,6 @@ import "../../Components/IconUtil.js" as IconUtil
2525DashPreview {
2626 id: root
2727
28− property bool canBeRated: root.previewData.rating >= 0.0
29−
3028 signal sendUserReview(string review)
3129
3230 title: root.previewData.title
@@ -156,48 +154,47 @@ DashPreview {
156154 styleColor: "black"
157155 }
158156
159− ListItem.ThinDivider {
160− visible: root.canBeRated
161− }
162−
163157 Item {
164− visible: root.canBeRated
158+ visible: root.previewData.rating >= 0
165159 anchors { left: parent.left; right: parent.right }
166− height: rateLabel.height
167−
168− Label {
169− id: rateLabel
170− fontSize: "medium"
171− color: "white"
172− style: Text.Raised
173− styleColor: "black"
174− opacity: .9
175− text: i18n.tr("Rate this")
176−
177− anchors.left: parent.left
178− anchors.verticalCenter: parent.verticalCenter
179− }
160+ height: childrenRect.height
180161
181− // FIXME these need to be made interactive and connected to the scope
182− RatingStars {
183− anchors.right: parent.right
184− anchors.verticalCenter: parent.verticalCenter
162+ ListItem.ThinDivider { }
163+
164+ Item {
165+ anchors { left: parent.left; right: parent.right }
166+ height: rateLabel.height
167+
168+ Label {
169+ id: rateLabel
170+ fontSize: "medium"
171+ color: "white"
172+ style: Text.Raised
173+ styleColor: "black"
174+ opacity: .9
175+ text: i18n.tr("Rate this")
176+
177+ anchors.left: parent.left
178+ anchors.verticalCenter: parent.verticalCenter
179+ }
180+
181+ // FIXME these need to be made interactive and connected to the scope
182+ RatingStars {
183+ anchors.right: parent.right
184+ anchors.verticalCenter: parent.verticalCenter
185+ }
185186 }
186− }
187187
188− ListItem.ThinDivider {
189− visible: root.canBeRated
190− }
188+ ListItem.ThinDivider { }
191189
192− AppReviews {
193− visible: root.canBeRated
194− objectName: "appReviews"
195− anchors { left: parent.left; right: parent.right }
190+ AppReviews {
191+ objectName: "appReviews"
192+ anchors { left: parent.left; right: parent.right }
196193
197− model: root.previewData.infoMap["comments"] ? root.previewData.infoMap["comments"].value : undefined
194+ model: root.previewData.infoMap["comments"] ? root.previewData.infoMap["comments"].value : undefined
198195
199− onSendReview: root.sendUserReview(review);
196+ onSendReview: root.sendUserReview(review);
197+ }
200198 }
201−
202199 }
203200}