harbour-batterybuddy/application/qml/pages/AboutPage.qml

141 lines
4.8 KiB
QML
Raw Normal View History

/**
* Battery Buddy, a Sailfish application to prolong battery lifetime
*
2020-03-21 04:27:09 +03:00
* Copyright (C) 2019-2020 Matti Viljanen
*
* Battery Buddy is free software: you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* Battery Buddy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU General Public License for more details. You should have received a copy of the GNU
2020-03-24 11:02:30 +03:00
* General Public License along with Battery Buddy. If not, see <http://www.gnu.org/licenses/>.
*
* Author: Matti Viljanen
*/
2019-01-05 21:16:04 +03:00
import QtQuick 2.0
import Sailfish.Silica 1.0
import "../components"
2019-01-05 21:16:04 +03:00
Page {
id: aboutPage
allowedOrientations: Orientation.Portrait | Orientation.Landscape | Orientation.LandscapeInverted
onStatusChanged: {
if(status === PageStatus.Active)
pageStack.pushAttached(Qt.resolvedUrl("LicensePage.qml"))
2019-01-05 21:16:04 +03:00
}
SilicaFlickable {
id: aboutFlickable
anchors.fill: parent
contentHeight: header.height + column.height
2019-01-05 21:16:04 +03:00
PageHeader {
id: header
title: qsTr("View License")
2019-01-05 21:16:04 +03:00
}
Column {
id: column
anchors {
top: header.bottom
horizontalCenter: parent.horizontalCenter
}
width: Math.min(Screen.width, aboutFlickable.width)
spacing: Theme.paddingLarge
Image {
anchors.horizontalCenter: parent.horizontalCenter
source: Qt.resolvedUrl("/usr/share/icons/hicolor/172x172/apps/harbour-batterybuddy.png")
width: Theme.iconSizeExtraLarge
height: Theme.iconSizeExtraLarge
smooth: true
asynchronous: true
}
AboutLabel {
font.pixelSize: Theme.fontSizeLarge
color: Theme.highlightColor
text: "Battery Buddy"
}
AboutLabel {
font.pixelSize: Theme.fontSizeMedium
color: Theme.primaryColor
text: qsTr("Battery Buddy is a small and simple utility designed to improve the lifetime of the battery.")
}
AboutLabel {
font.pixelSize: Theme.fontSizeSmall
color: Theme.secondaryColor
text: qsTr("Version") + " " + app_version
}
AboutLabel {
font.pixelSize: Theme.fontSizeSmall
color: Theme.secondaryColor
text: "Copyright 2019-2020 Matti Viljanen"
}
2020-04-26 17:21:19 +03:00
AboutLabel {
font.pixelSize: Theme.fontSizeSmall
color: Theme.secondaryColor
text: qsTr("If you like my work and would like to support me, you can buy me a coffee!")
}
BackgroundItem {
anchors.horizontalCenter: parent.horizontalCenter
width: Theme.iconSizeExtraLarge * 1.2
height: Theme.iconSizeExtraLarge * 1.2
onClicked: Qt.openUrlExternally("https://ko-fi.com/direc85")
contentItem.radius: Theme.paddingSmall
Image {
anchors.centerIn: parent
source: Qt.resolvedUrl("/usr/share/harbour-batterybuddy/images/Ko-fi_Icon_RGB_rounded.png")
width: Theme.iconSizeExtraLarge
height: Theme.iconSizeExtraLarge
smooth: true
asynchronous: true
}
}
AboutLabel {
font.pixelSize: Theme.fontSizeSmall
color: Theme.secondaryColor
text: "Suomi: Matti Viljanen\n"+
"Français: Quenty31\n"+
"简体中文: dashinfantry\n"+
"svensk: eson57"
}
AboutLabel {
font.pixelSize: Theme.fontSizeSmall
color: Theme.secondaryColor
text: qsTr("Battery Buddy is open source software licensed under the terms of the GNU General Public License.")
}
AboutLabel {
font.pixelSize: Theme.fontSizeSmall
color: Theme.secondaryColor
text: qsTr("Contributions and translations are always appreciated!")
}
Button {
text: "GitHub"
anchors.horizontalCenter: parent.horizontalCenter
onClicked: Qt.openUrlExternally("https://github.com/direc85/harbour-batterybuddy")
}
Item {
width: parent.width
height: Theme.paddingMedium
}
2019-01-05 21:16:04 +03:00
}
}
}