Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[qml/pages/AboutPage.qml] Enhance page layout #94

Draft
wants to merge 1 commit into
base: devel
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading