Commit bc2e71d3 authored by Nathaniel Graham's avatar Nathaniel Graham

Improve display of technical app info

Summary:
Improve display of app info in the following ways
- Display the app's caption in bold and apart from the other pieces to make it stand out more
- Group the pieces of info in a recognizable section
- Right-justify all the labels to make everything easier to parse
- Don't display the category with a link color since it's not a link

Test Plan:
Tested in KDE Neon. Before:
{F5577431}

After:
{F5587546}

(Ignore the duplicated categories in the sidebar; that's an unrelated issue tracked by https://bugs.kde.org/show_bug.cgi?id=388313)

Reviewers: apol, #vdg, #discover_software_store

Reviewed By: apol, #discover_software_store

Subscribers: colomar, januz, alexeymin, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D9542
parent 0c2db42b
......@@ -148,40 +148,58 @@ DiscoverPage {
ColumnLayout {
spacing: 0
QQC2.Label {
Layout.fillWidth: true
Kirigami.Heading {
text: appInfo.application.comment
wrapMode: Text.WordWrap
level: 4
Layout.fillWidth: true
elide: Text.ElideRight
maximumLineCount: 1
bottomPadding: Kirigami.Units.largeSpacing
}
GridLayout {
rowSpacing: 0
columns: 2
// Category row
QQC2.Label {
Layout.alignment: Qt.AlignRight
text: i18n("Category:")
}
QQC2.Label {
Layout.fillWidth: true
elide: Text.ElideRight
text: appInfo.application.categoryDisplay
color: Kirigami.Theme.linkColor
}
Item {
Layout.fillWidth: true
Layout.fillHeight: true
}
// Version row
QQC2.Label {
Layout.fillWidth: true
elide: Text.ElideRight
readonly property string version: appInfo.application.isInstalled ? appInfo.application.installedVersion : appInfo.application.availableVersion
visible: version.length > 0
text: version ? i18n("Version: %1", version) : ""
Layout.alignment: Qt.AlignRight
text: i18n("Version:")
}
QQC2.Label {
readonly property string version: appInfo.application.isInstalled ? appInfo.application.installedVersion : appInfo.application.availableVersion
visible: version.length > 0
Layout.fillWidth: true
elide: Text.ElideRight
text: i18n("Size: %1", appInfo.application.sizeDescription)
text: version ? version : ""
}
RowLayout {
// Size row
QQC2.Label {
Layout.alignment: Qt.AlignRight
text: i18n("Size:")
}
QQC2.Label {
Layout.fillWidth: true
elide: Text.ElideRight
text: i18n("%1", appInfo.application.sizeDescription)
}
// Source row
QQC2.Label {
Layout.alignment: Qt.AlignRight
text: i18n("Source:")
}
LinkButton {
......@@ -189,20 +207,40 @@ DiscoverPage {
horizontalAlignment: Text.AlignLeft
enabled: alternativeResourcesView.count > 1
text: appInfo.application.displayOrigin
elide: Text.ElideRight
onClicked: originsOverlay.open()
}
}
RowLayout {
// License row
QQC2.Label {
Layout.alignment: Qt.AlignRight
text: i18n("License:")
}
LinkButton {
elide: Text.ElideRight
Layout.fillWidth: true
horizontalAlignment: Text.AlignLeft
text: appInfo.application.license
// tooltip: i18n("See full license terms")
onClicked: Qt.openUrlExternally("https://spdx.org/licenses/" + appInfo.application.license + ".html#licenseText")
}
// Homepage row
QQC2.Label {
readonly property string homepage: application.homepage
visible: homepage.length > 0
Layout.alignment: Qt.AlignRight
text: i18n("Homepage:")
}
LinkButton {
readonly property string homepage: application.homepage
visible: homepage.length > 0
text: homepage
onClicked: Qt.openUrlExternally(application.homepage)
elide: Text.ElideRight
Layout.fillWidth: true
horizontalAlignment: Text.AlignLeft
}
}
ApplicationScreenshots {
......@@ -232,18 +270,6 @@ DiscoverPage {
}
}
RowLayout {
visible: button.text.length > 0
QQC2.Label {
text: i18n("Homepage: ")
}
LinkButton {
id: button
text: application.homepage
onClicked: Qt.openUrlExternally(application.homepage)
}
}
LinkButton {
id: addonsButton
text: i18n("Addons")
......
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