Commit a71bf27e authored by Marco Martin's avatar Marco Martin

move the header in the OverlaySheet header

Summary:
Since now overlaysheets have the header always visible when there is a
close button, put the write review button in there so that's always
visible itself and the layout looks cleaner

Test Plan:
Before:
{F8209177}

After:
{F8209181}

Reviewers: #discover_software_store, ngraham

Reviewed By: #discover_software_store, ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D28474
parent 023b0bef
......@@ -45,40 +45,39 @@ Kirigami.OverlaySheet {
page.sheetOpen = false
}
header: ColumnLayout {
width: parent.width
spacing: 0
Button {
id: reviewButton
Layout.alignment: Qt.AlignHCenter
visible: page.reviewsBackend != null
enabled: page.resource.isInstalled
text: i18n("Write a Review...")
onClicked: page.openReviewDialog()
}
Label {
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: Kirigami.Units.largeSpacing * 2
text: i18n("Install this app to write a review")
wrapMode: Text.WordWrap
visible: !reviewButton.enabled
opacity: 0.6
}
}
ListView {
id: reviewsView
clip: true
topMargin: Kirigami.Units.largeSpacing
spacing: Kirigami.Units.smallSpacing
implicitWidth: Kirigami.Units.gridUnit * 25
cacheBuffer: Math.max(0, contentHeight)
header: ColumnLayout {
width: parent.width
spacing: 0
Button {
id: reviewButton
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: Kirigami.Units.largeSpacing
Layout.bottomMargin: Kirigami.Units.largeSpacing
visible: page.reviewsBackend != null
enabled: page.resource.isInstalled
text: i18n("Write a Review...")
onClicked: page.openReviewDialog()
}
Label {
Layout.alignment: Qt.AlignHCenter
Layout.bottomMargin: Kirigami.Units.largeSpacing * 2
text: i18n("Install this app to write a review")
wrapMode: Text.WordWrap
visible: !reviewButton.enabled
opacity: 0.6
}
}
delegate: ReviewDelegate {
width: parent.width
separator: index != ListView.view.count-1
......
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