Commit fb1880d4 authored by Nate Graham's avatar Nate Graham 🔩

Give all OverlaySheets consistent headers

Summary:
OverlaySheet has a `header:` property typically used to give the sheet a title. This patch
used it to give all of Discover's OverlaySheets appropriate titles. The review sheet's
top layout is slightly adjusted to make this look good.

Test Plan:
{F8316475}
{F8316512}

Reviewers: apol, #discover_software_store, #vdg

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D29709
parent a4403f61
......@@ -13,17 +13,14 @@ Kirigami.OverlaySheet
readonly property bool containsAddons: rep.count>0 || isExtended
readonly property bool isExtended: ResourcesModel.isExtended(application.appstreamId)
header: Kirigami.Heading { text: i18n("Addons") }
ColumnLayout
{
visible: addonsView.containsAddons
enabled: !addonsView.isInstalling
spacing: Kirigami.Units.largeSpacing
Kirigami.Heading {
level: 3
text: i18n("Addons")
}
Repeater
{
id: rep
......
......@@ -193,10 +193,13 @@ Kirigami.ApplicationWindow
property alias title: heading.text
property alias description: desc.text
property bool acted: false
header: Kirigami.Heading {
id: heading
wrapMode: Text.WordWrap
}
ColumnLayout {
Kirigami.Heading {
id: heading
}
Label {
id: desc
Layout.fillWidth: true
......
......@@ -49,25 +49,30 @@ Kirigami.OverlaySheet {
width: parent.width
spacing: Kirigami.Units.largeSpacing
Button {
id: reviewButton
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: enabled ? undefined : Kirigami.Units.largeSpacing
visible: page.reviewsBackend != null
enabled: page.resource.isInstalled
text: i18n("Write a Review...")
onClicked: page.openReviewDialog()
Kirigami.Heading {
Layout.fillWidth: true
wrapMode: Text.WordWrap
text: i18n("Reviews for %1", page.resource.name)
}
Label {
Layout.alignment: Qt.AlignHCenter
RowLayout {
Layout.bottomMargin: Kirigami.Units.largeSpacing
text: i18n("Install this app to write a review")
wrapMode: Text.WordWrap
visible: !reviewButton.enabled
opacity: 0.6
Button {
id: reviewButton
visible: page.reviewsBackend != null
enabled: page.resource.isInstalled
text: i18n("Write a Review...")
onClicked: page.openReviewDialog()
}
Label {
text: i18n("Install this app to write a review")
wrapMode: Text.WordWrap
visible: !reviewButton.enabled
opacity: 0.6
}
}
}
......
......@@ -113,10 +113,13 @@ DiscoverPage {
property alias title: heading.text
property alias description: desc.text
property bool acted: false
header: Kirigami.Heading {
id: heading
wrapMode: Text.WordWrap
}
ColumnLayout {
Kirigami.Heading {
id: heading
}
Label {
id: desc
Layout.fillWidth: true
......
......@@ -36,6 +36,8 @@ DiscoverPage
readonly property var sheet: Kirigami.OverlaySheet {
id: sheet
header: Kirigami.Heading { text: i18n("Update issue") }
ColumnLayout {
Label {
id: desc
......
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