Skip to content

Commit

Permalink
[qml/pages/AboutPage.qml] Enhance page layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Olf0 authored Apr 1, 2024
1 parent 0de96d8 commit 63926ba
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions qml/pages/AboutPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ Page {
anchors.fill: parent

contentWidth: parent.width;
contentHeight: pageHeader.height + contentColumn.height + Theme.paddingLarge
contentHeight: pageHeader.height + contentColumn.height + Theme.verticalPageMargin

flickableDirection: Flickable.VerticalFlick

PageHeader {
id: pageHeader
title: "About"
title: qsTr("About")
}

Column {
Expand All @@ -35,11 +35,13 @@ Page {
top: pageHeader.bottom
horizontalCenter: parent.horizontalCenter
}
width: parent.width
width: parent.width - Theme.horizontalPageMargin

Rectangle {
color: "transparent"
width: parent.width
// This does not work as intended with `fillMode: Image.PreserveAspectFit`:
// Image is not scaled up to its `width: parent.width`!
height: childrenRect.height
Image {
id: coverImage
Expand All @@ -49,6 +51,7 @@ Page {
clip: true
asynchronous: true
width: parent.width
Layout.fillWidth: true
anchors.horizontalCenter: parent.horizontalCenter
}

Expand All @@ -59,7 +62,7 @@ Page {
topMargin: Theme.paddingSmall
horizontalCenter: parent.horizontalCenter
}
width: parent.width - Theme.horizontalPageMargin
width: parent.width
text: qsTr("Read your favourite comic strips every day.")
font {
italic: true
Expand All @@ -75,9 +78,9 @@ Page {
topMargin: Theme.paddingMedium
horizontalCenter: parent.horizontalCenter
}
width: parent.width - Theme.horizontalPageMargin
width: parent.width
text: qsTr("Version %1").arg(Qt.application.version)
font.pixelSize: Theme.fontSizeSmall
font.pixelSize: Theme.fontSizeMedium
horizontalAlignment: Text.AlignHCenter
}

Expand All @@ -88,9 +91,9 @@ Page {
topMargin: Theme.paddingLarge
horizontalCenter: parent.horizontalCenter
}
width: parent.width - Theme.horizontalPageMargin
width: parent.width
text: qsTr("<a href=\"%1\">Source code repository</a>").arg(constants.repoGithub)
font.pixelSize: Theme.fontSizeSmall
font.pixelSize: Theme.fontSizeMedium
horizontalAlignment: Text.AlignHCenter
linkColor: Theme.highlightColor
onLinkActivated: Qt.openUrlExternally(link)
Expand All @@ -103,9 +106,9 @@ Page {
topMargin: Theme.paddingMedium
horizontalCenter: parent.horizontalCenter
}
width: parent.width - Theme.horizontalPageMargin
width: parent.width
text: qsTr("License: %1").arg("MIT")
font.pixelSize: Theme.fontSizeSmall
font.pixelSize: Theme.fontSizeMedium
horizontalAlignment: Text.AlignHCenter
}

Expand All @@ -116,10 +119,10 @@ Page {
topMargin: Theme.paddingLarge
horizontalCenter: parent.horizontalCenter
}
width: parent.width - Theme.horizontalPageMargin
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("<a href=\"%1\">Issue tracker for bug reports, feature suggestions and help requests</a>").arg(constants.issuesGithub)
font.pixelSize: Theme.fontSizeSmall
font.pixelSize: Theme.fontSizeMedium
horizontalAlignment: Text.AlignHCenter
linkColor: Theme.highlightColor
onLinkActivated: Qt.openUrlExternally(link)
Expand Down

0 comments on commit 63926ba

Please sign in to comment.