Changeset View
Changeset View
Standalone View
Standalone View
discover/qml/ApplicationPage.qml
Show First 20 Lines • Show All 202 Lines • ▼ Show 20 Line(s) | 145 | ColumnLayout { | |||
---|---|---|---|---|---|
203 | 203 | | |||
204 | LinkButton { | 204 | LinkButton { | ||
205 | id: addonsButton | 205 | id: addonsButton | ||
206 | text: i18n("Addons") | 206 | text: i18n("Addons") | ||
207 | visible: addonsView.containsAddons | 207 | visible: addonsView.containsAddons | ||
208 | onClicked: addonsView.sheetOpen = true | 208 | onClicked: addonsView.sheetOpen = true | ||
209 | } | 209 | } | ||
210 | 210 | | |||
211 | | ||||
212 | Kirigami.Heading { | ||||
213 | Layout.topMargin: Kirigami.Units.largeSpacing | ||||
214 | text: i18n("Reviews") | ||||
215 | level: 2 | ||||
216 | visible: rep.count > 0 | ||||
217 | } | ||||
218 | | ||||
219 | Rectangle { | ||||
220 | color: Kirigami.Theme.linkColor | ||||
221 | Layout.fillWidth: true | ||||
222 | height: 1 | ||||
223 | visible: rep.count > 0 | ||||
224 | } | ||||
225 | | ||||
226 | Repeater { | ||||
227 | id: rep | ||||
228 | model: PaginateModel { | ||||
229 | sourceModel: reviewsSheet.model | ||||
230 | pageSize: 3 | ||||
231 | } | ||||
232 | delegate: ReviewDelegate { | ||||
233 | Layout.topMargin: Kirigami.Units.largeSpacing | ||||
234 | separator: false | ||||
235 | compact: true | ||||
236 | Layout.bottomMargin: Kirigami.Units.largeSpacing | ||||
237 | } | ||||
238 | } | ||||
211 | LinkButton { | 239 | LinkButton { | ||
212 | text: i18n("Review") | 240 | text: i18n("Review") | ||
213 | onClicked: reviewsSheet.openReviewDialog() | 241 | onClicked: reviewsSheet.openReviewDialog() | ||
214 | visible: !commentsButton.visible && reviewsModel.backend && reviewsModel.backend.isResourceSupported(appInfo.application) | 242 | visible: !commentsButton.visible && reviewsModel.backend && reviewsModel.backend.isResourceSupported(appInfo.application) | ||
215 | } | 243 | } | ||
216 | LinkButton { | 244 | LinkButton { | ||
217 | id: commentsButton | 245 | id: commentsButton | ||
218 | readonly property QtObject rating: appInfo.application.rating | 246 | readonly property QtObject rating: appInfo.application.rating | ||
219 | visible: rating && rating.ratingCount>0 && reviewsModel.count | 247 | visible: rating && rating.ratingCount>0 && reviewsModel.count | ||
220 | text: i18n("Show reviews (%1)...", rating ? reviewsModel.count : 0) | 248 | text: i18n("Show more reviews (%1)...", rating ? reviewsModel.count : 0) | ||
221 | 249 | | |||
222 | onClicked: { | 250 | onClicked: { | ||
223 | reviewsSheet.open() | 251 | reviewsSheet.open() | ||
224 | } | 252 | } | ||
253 | Layout.bottomMargin: Kirigami.Units.largeSpacing | ||||
225 | } | 254 | } | ||
226 | 255 | | |||
227 | Item { | | |||
228 | height: addonsButton.height | | |||
229 | width: 5 | | |||
230 | } | | |||
231 | | ||||
232 | // Details/metadata | | |||
233 | Rectangle { | 256 | Rectangle { | ||
234 | Layout.topMargin: Kirigami.Units.smallSpacing | | |||
235 | color: Kirigami.Theme.linkColor | 257 | color: Kirigami.Theme.linkColor | ||
236 | Layout.fillWidth: true | 258 | Layout.fillWidth: true | ||
237 | height: 1 | 259 | height: 1 | ||
238 | Layout.bottomMargin: Kirigami.Units.smallSpacing | 260 | Layout.bottomMargin: Kirigami.Units.largeSpacing | ||
239 | } | 261 | } | ||
240 | GridLayout { | 262 | GridLayout { | ||
241 | rowSpacing: 0 | 263 | rowSpacing: 0 | ||
242 | columns: 2 | 264 | columns: 2 | ||
243 | 265 | | |||
244 | // Category row | 266 | // Category row | ||
245 | QQC2.Label { | 267 | QQC2.Label { | ||
246 | Layout.alignment: Qt.AlignRight | 268 | Layout.alignment: Qt.AlignRight | ||
▲ Show 20 Lines • Show All 136 Lines • Show Last 20 Lines |