diff --git a/discover/qml/AboutPage.qml b/discover/qml/AboutPage.qml
--- a/discover/qml/AboutPage.qml
+++ b/discover/qml/AboutPage.qml
@@ -22,7 +22,7 @@
import QtQuick.Layouts 1.3
import org.kde.kirigami 2.5 as Kirigami
-Kirigami.Page
+Kirigami.ScrollablePage
{
id: page
property var aboutData: discoverAboutData
@@ -33,7 +33,40 @@
]
title: i18n("About")
- header: ColumnLayout {
+ Component {
+ id: licencePage
+ Kirigami.ScrollablePage {
+ property alias text: content.text
+ TextArea {
+ id: content
+ readOnly: true
+ }
+ }
+ }
+
+ Component {
+ id: personDelegate
+ Kirigami.AbstractCard {
+ Layout.fillWidth: true
+ contentItem: RowLayout {
+ Layout.preferredHeight: Kirigami.Units.iconSizes.medium
+ Kirigami.Icon {
+ Layout.fillHeight: true
+ Layout.alignment: Qt.AlignVCenter
+ Layout.minimumWidth: Kirigami.Units.iconSizes.medium
+ Layout.maximumWidth: Kirigami.Units.iconSizes.medium
+ source: "https://www.gravatar.com/avatar/" + Qt.md5(modelData.emailAddress) + "?d=404&s=" + Kirigami.Units.iconSizes.medium
+ fallback: "user"
+ }
+ Label {
+ Layout.fillWidth: true
+ text: i18n("%1 <%2>", modelData.name, modelData.emailAddress)
+ }
+ }
+ }
+ }
+
+ ColumnLayout {
GridLayout {
columns: 2
Layout.fillWidth: true
@@ -56,88 +89,81 @@
text: page.aboutData.shortDescription
}
}
- TabBar {
+
+ Kirigami.Separator {
Layout.fillWidth: true
- id: bar
- TabButton { text: i18n("About") }
- TabButton { text: i18n("Libraries") }
- TabButton { text: i18n("Authors") }
}
- }
- Component {
- id: licencePage
- Kirigami.ScrollablePage {
- property alias text: content.text
- TextArea {
- id: content
- readOnly: true
- }
+ Kirigami.Heading {
+ text: i18n("About %1...", page.aboutData.displayName)
+ }
+ Label {
+ Layout.leftMargin: Kirigami.Units.gridUnit
+ text: aboutData.otherText
+ visible: text.length > 0
+ }
+ Label {
+ Layout.leftMargin: Kirigami.Units.gridUnit
+ text: aboutData.copyrightStatement
+ visible: text.length > 0
+ }
+ UrlButton {
+ Layout.leftMargin: Kirigami.Units.gridUnit
+ url: aboutData.homepage
+ visible: url.length > 0
}
- }
-
- SwipeView {
- anchors.fill: parent
- currentIndex: bar.currentIndex
- interactive: false
- ColumnLayout {
- Label {
- text: aboutData.shortDescription
- visible: text.length > 0
- }
- Label {
- text: aboutData.otherText
- visible: text.length > 0
- }
- Label {
- text: aboutData.copyrightStatement
- visible: text.length > 0
- }
- UrlButton {
- url: aboutData.homepage
- visible: url.length > 0
- }
- Repeater {
- id: rep
- model: aboutData.licenses
- delegate: LinkButton {
+ Repeater {
+ id: rep
+ model: aboutData.licenses
+ delegate: RowLayout {
+ Layout.leftMargin: Kirigami.Units.gridUnit
+ Label { text: i18n("License:" ) }
+ LinkButton {
text: modelData.name
onClicked: applicationWindow().pageStack.push(licencePage, { text: modelData.text, title: modelData.name } )
}
}
+ }
- Item {
- Layout.fillHeight: true
- }
+ Kirigami.Heading {
+ text: i18n("Libraries")
}
Label {
id: libraries
text: page.aboutLibraries
}
- Kirigami.CardsListView {
- header: Label {
- readonly property string bugAddress: aboutData.bugAddress || "https://bugs.kde.org"
- readonly property string bugDisplay: aboutData.bugAddress ? ("mailto:" + aboutData.bugAddress) : "https://bugs.kde.org"
- text: i18n("Please use " + bugDisplay + " to report bugs.\n")
- }
+ Kirigami.Heading {
+ text: i18n("Authors")
+ }
+ Label {
+ readonly property string bugDisplay: aboutData.bugAddress || "https://bugs.kde.org"
+ readonly property string bugAddress: aboutData.bugAddress ? ("mailto:" + aboutData.bugAddress) : "https://bugs.kde.org"
+ Layout.fillWidth: true
+ horizontalAlignment: Text.AlignRight
+ text: i18n("Please use " + bugDisplay + " to report bugs.\n")
+ }
+ Repeater {
model: aboutData.authors
- delegate: Kirigami.AbstractCard {
- contentItem: RowLayout {
- Layout.preferredHeight: Kirigami.Units.iconSizes.medium
- Kirigami.Icon {
- Layout.fillHeight: true
- Layout.minimumWidth: Kirigami.Units.iconSizes.medium
- Layout.maximumWidth: Kirigami.Units.iconSizes.medium
- source: "https://www.gravatar.com/avatar/" + Qt.md5(modelData.emailAddress) + "?d=404&s=" + Kirigami.Units.iconSizes.medium
- fallback: "user"
- }
- Label {
- Layout.fillWidth: true
- text: i18n("%1 <%2>", modelData.name, modelData.emailAddress)
- }
- }
- }
+ delegate: personDelegate
+ }
+ Kirigami.Heading {
+ text: i18n("Credits")
+ visible: repCredits.count > 0
+ }
+ Repeater {
+ id: repCredits
+ model: aboutData.translators
+ delegate: personDelegate
+ }
+ Kirigami.Heading {
+ text: i18n("Translators")
+ visible: repTranslators.count > 0
+ }
+ Repeater {
+ id: repTranslators
+ model: aboutData.translators
+ delegate: personDelegate
}
}
}