Commit 3bbe138d authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Improve the ReviewsPage look

Just add the necessary margin on the view.
Also let it show it's a sheet when displaying the margin instead of
just showing blank space on wide mode.

BUG: 389536
parent 081a2493
...@@ -39,6 +39,7 @@ DiscoverPage { ...@@ -39,6 +39,7 @@ DiscoverPage {
ReviewsPage { ReviewsPage {
id: reviewsSheet id: reviewsSheet
parentWidth: appInfo.width
model: ReviewsModel { model: ReviewsModel {
id: reviewsModel id: reviewsModel
resource: appInfo.application resource: appInfo.application
......
...@@ -29,6 +29,7 @@ Kirigami.OverlaySheet { ...@@ -29,6 +29,7 @@ Kirigami.OverlaySheet {
property alias model: reviewsView.model property alias model: reviewsView.model
readonly property QtObject reviewsBackend: resource.backend.reviewsBackend readonly property QtObject reviewsBackend: resource.backend.reviewsBackend
readonly property var resource: model.resource readonly property var resource: model.resource
property real parentWidth: 0
readonly property var rd: ReviewDialog { readonly property var rd: ReviewDialog {
id: reviewDialog id: reviewDialog
...@@ -44,6 +45,7 @@ Kirigami.OverlaySheet { ...@@ -44,6 +45,7 @@ Kirigami.OverlaySheet {
ListView { ListView {
id: reviewsView id: reviewsView
implicitWidth: page.parentWidth * (applicationWindow().wideScreen ? 3/4 : 1)
clip: true clip: true
spacing: Kirigami.Units.smallSpacing spacing: Kirigami.Units.smallSpacing
...@@ -59,6 +61,7 @@ Kirigami.OverlaySheet { ...@@ -59,6 +61,7 @@ Kirigami.OverlaySheet {
anchors { anchors {
left: parent.left left: parent.left
right: parent.right right: parent.right
margins: Kirigami.Units.gridUnit
} }
onMarkUseful: page.model.markUseful(index, useful) onMarkUseful: page.model.markUseful(index, useful)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment