diff --git a/discover/qml/ApplicationPage.qml b/discover/qml/ApplicationPage.qml --- a/discover/qml/ApplicationPage.qml +++ b/discover/qml/ApplicationPage.qml @@ -221,6 +221,26 @@ onClicked: addonsView.sheetOpen = true } + Rectangle { + Layout.topMargin: Kirigami.Units.largeSpacing + color: Kirigami.Theme.linkColor + Layout.fillWidth: true + height: 1 + visible: rep.count > 0 + Layout.bottomMargin: Kirigami.Units.largeSpacing + } + + Repeater { + id: rep + model: PaginateModel { + sourceModel: reviewsSheet.model + pageSize: 3 + } + delegate: ReviewDelegate { + separator: index+1 < rep.count + compact: true + } + } LinkButton { text: i18n("Review") onClicked: reviewsSheet.openReviewDialog() @@ -237,18 +257,12 @@ } } - Item { - height: addonsButton.height - width: 5 - } - - // Details/metadata Rectangle { - Layout.topMargin: Kirigami.Units.smallSpacing + Layout.topMargin: Kirigami.Units.largeSpacing color: Kirigami.Theme.linkColor Layout.fillWidth: true height: 1 - Layout.bottomMargin: Kirigami.Units.smallSpacing + Layout.bottomMargin: Kirigami.Units.largeSpacing } GridLayout { rowSpacing: 0 diff --git a/discover/qml/ReviewDelegate.qml b/discover/qml/ReviewDelegate.qml --- a/discover/qml/ReviewDelegate.qml +++ b/discover/qml/ReviewDelegate.qml @@ -27,6 +27,8 @@ { id: item visible: model.shouldShow + property bool compact: false + property bool separator: true signal markUseful(bool useful) function usefulnessToString(favorable, total) @@ -56,10 +58,12 @@ wrapMode: Text.Wrap } Label { + visible: !item.compact text: usefulnessToString(usefulnessFavorable, usefulnessTotal) } Label { + visible: !item.compact Layout.alignment: Qt.AlignRight text: { switch(usefulChoice) { @@ -77,6 +81,7 @@ onLinkActivated: item.markUseful(link=='true') } Kirigami.Separator { + visible: item.separator Layout.fillWidth: true } }