About page improvements

This commit is contained in:
Muki 2019-02-27 21:12:35 +01:00
parent a7c533ceba
commit 5c79b59cd3
8 changed files with 175 additions and 149 deletions

View file

@ -39,6 +39,7 @@ SOURCES += \
src/iconprovider.cpp
HEADERS += \
src/info.h \
src/ai.h \
src/utils.h \
src/tabmodel.h \

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2014 Michal Kosciesza <michal@mkiol.net>
Copyright (C) 2014-2019 Michal Kosciesza <michal@mkiol.net>
This file is part of Kaktus.
@ -37,126 +37,38 @@ Page {
ActiveDetector {}
SilicaListView {
SilicaFlickable {
anchors { top: parent.top; left: parent.left; right: parent.right }
clip: true
height: app.flickHeight
contentHeight: column.height
anchors.leftMargin: Theme.paddingLarge
anchors.rightMargin: Theme.paddingLarge
spacing: Theme.paddingLarge
Column {
id: column
header: PageHeader {
title: qsTr("About")
}
width: root.width
spacing: Theme.paddingLarge
model: VisualItemModel {
PageHeader {
title: qsTr("About")
}
Image {
anchors.horizontalCenter: parent.horizontalCenter
source: "image://icons/icon-i-kaktus"
}
Label {
anchors.horizontalCenter: parent.horizontalCenter
font.pixelSize: Theme.fontSizeHuge
InfoLabel {
text: APP_NAME
}
Label {
anchors.horizontalCenter: parent.horizontalCenter
PaddedLabel {
horizontalAlignment: Text.AlignHCenter
font.pixelSize: Theme.fontSizeMedium
color: Theme.highlightColor
wrapMode: Text.WordWrap
text: qsTr("Version: %1").arg(VERSION);
}
Label {
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
anchors.left: parent.left; anchors.right: parent.right
font.pixelSize: Theme.fontSizeSmall
text: qsTr("Multi services feed reader, specially designed to work offline.");
}
/*Separator {
anchors.left: parent.left
anchors.right: parent.right
color: Theme.primaryColor
}*/
Label {
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
anchors.left: parent.left; anchors.right: parent.right
font.pixelSize: Theme.fontSizeExtraSmall
text: "<u>%1</u>".arg(PAGE)
textFormat: Text.StyledText
MouseArea {
anchors.fill: parent
onClicked: {
notification.show(qsTr("Launching an external browser..."));
Qt.openUrlExternally(PAGE);
}
}
}
/*Separator {
anchors.left: parent.left
anchors.right: parent.right
color: Theme.primaryColor
}*/
Label {
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
anchors.left: parent.left; anchors.right: parent.right
font.pixelSize: Theme.fontSizeExtraSmall
textFormat: Text.RichText
text: "Copyright &copy; 2014-2017 Michal Kosciesza"
}
Label {
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
anchors.left: parent.left; anchors.right: parent.right
font.pixelSize: Theme.fontSizeExtraSmall
text: qsTr("This software is distributed under the terms of the "+
"GNU General Public Licence version 3.")
MouseArea {
anchors.fill: parent
onClicked: {
notification.show(qsTr("Launching an external browser..."));
Qt.openUrlExternally("https://www.gnu.org/licenses/gpl-3.0.txt");
}
}
}
/*Label {
wrapMode: Text.WordWrap
horizontalAlignment: Text.HorizontalFit
anchors.left: parent.left; anchors.right: parent.right
font.pixelSize: Theme.fontSizeExtraSmall
text: qsTr("Be aware that Kaktus is an UNOFFICIAL application. It means 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.")
}*/
/*Separator {
anchors.left: parent.left
anchors.right: parent.right
color: Theme.primaryColor
}*/
Item {
height: Theme.paddingLarge
text: qsTr("Version %1").arg(APP_VERSION);
}
Button {
@ -165,11 +77,78 @@ Page {
onClicked: pageStack.push(Qt.resolvedUrl("ChangelogPage.qml"))
}
Item {
height: Theme.paddingLarge
Button {
text: qsTr("Project website")
anchors.horizontalCenter: parent.horizontalCenter
onClicked: Qt.openUrlExternally(PAGE)
}
SectionHeader {
text: qsTr("Authors")
}
PaddedLabel {
horizontalAlignment: Text.AlignLeft
textFormat: Text.RichText
text: ("Copyright &copy; %1 %2")
.arg(COPYRIGHT_YEAR)
.arg(AUTHOR)
}
PaddedLabel {
horizontalAlignment: Text.AlignLeft
textFormat: Text.RichText
text: ("Copyright &copy; %1 %2")
.arg(COPYRIGHT_YEAR1)
.arg(AUTHOR1)
}
PaddedLabel {
horizontalAlignment: Text.AlignLeft
text: qsTr("Translations are provided by:")
}
PaddedLabel {
horizontalAlignment: Text.AlignLeft
text: "Nathan Follens \nFri \nJozef Mlích \nCarmen Fernández B. " +
"\nGökhan Kalayci \nFallaffel Box \nBenjamin (schnubbbi) \nR.G. Sidler " +
"\nKoleesch \nFravaccaro \nPetr Tsymbarovich \nAndrey Getmantsev " +
"\nKiratonin \nАлексей Дедун \nmentaljam \nJosé Jiménez \nMesut Aktaş"
}
PaddedLabel {
horizontalAlignment: Text.AlignLeft
textFormat: Text.StyledText
text: qsTr("%1 is developed as an open source project under %2.")
.arg(APP_NAME)
.arg("<a href=\"" + LICENSE_URL + "\">" + LICENSE + "</a>")
}
SectionHeader {
text: qsTr("Libraries")
}
PaddedLabel {
horizontalAlignment: Text.AlignLeft
textFormat: Text.RichText
text: "QHTTPServer - Copyright &copy; 2011-2014 Nikhil Marathe"
}
PaddedLabel {
horizontalAlignment: Text.AlignLeft
textFormat: Text.RichText
text: "Readability.js - Copyright &copy; 2010 Arc90 Inc"
}
PaddedLabel {
horizontalAlignment: Text.AlignLeft
textFormat: Text.RichText
text: "SimpleCrypt - Copyright &copy; 2011 Andre Somers"
}
Spacer {}
}
//VerticalScrollDecorator {}
VerticalScrollDecorator {}
}
}

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2016 Michal Kosciesza <michal@mkiol.net>
Copyright (C) 2016-2019 Michal Kosciesza <michal@mkiol.net>
This file is part of Kaktus.
@ -20,7 +20,6 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
Page {
id: root
@ -29,11 +28,11 @@ Page {
allowedOrientations: {
switch (settings.allowedOrientations) {
case 1:
return Orientation.Portrait;
return Orientation.Portrait
case 2:
return Orientation.Landscape;
return Orientation.Landscape
}
return Orientation.Landscape | Orientation.Portrait;
return Orientation.Landscape | Orientation.Portrait
}
ActiveDetector {}
@ -45,17 +44,17 @@ Page {
right: parent.right
top: parent.top
}
height: app.flickHeight
clip: true
contentHeight: content.height
Column {
id: content
anchors {
left: parent.left
right: parent.right
}
width: root.width
spacing: Theme.paddingMedium
PageHeader {
@ -95,7 +94,7 @@ Page {
description: "Option in the settings that allows you to clear cache and cookies of the web viewer."
}
SectionHeader {
/*SectionHeader {
text: qsTr("Version %1").arg("2.5.3")
}
@ -280,7 +279,7 @@ Page {
description: 'Many improvements, like performance optimization and UI polishing were made.'
}
/*SectionHeader {
SectionHeader {
text: qsTr("Version %1").arg("1.4")
}

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2014 Michal Kosciesza <michal@mkiol.net>
Copyright (C) 2014-2019 Michal Kosciesza <michal@mkiol.net>
This file is part of Kaktus.
@ -28,7 +28,7 @@ Row {
anchors.left: parent.left; anchors.right: parent.right
anchors.leftMargin: Theme.paddingLarge; anchors.rightMargin: Theme.paddingLarge
spacing: 1.0*Theme.paddingLarge
spacing: Theme.paddingLarge
Column {
spacing: Theme.paddingSmall
@ -39,21 +39,22 @@ Row {
id: label1
width: parent.width
wrapMode: Text.WordWrap
color: Theme.primaryColor
font.bold: true
color: Theme.highlightColor
}
Label {
id: label2
width: parent.width
wrapMode: Text.WordWrap
color: Theme.primaryColor
font.pixelSize: Theme.fontSizeSmall
color: Theme.highlightColor
linkColor: Theme.primaryColor
textFormat: Text.StyledText
onLinkActivated: {
Qt.openUrlExternally(link);
}
}
Item {
height: Theme.paddingLarge
width: parent.width
}
Spacer {}
}
}

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2014 Michal Kosciesza <michal@mkiol.net>
Copyright (C) 2014-2019 Michal Kosciesza <michal@mkiol.net>
This file is part of Kaktus.
@ -20,8 +20,15 @@
import QtQuick 2.0
import Sailfish.Silica 1.0
Label {
anchors { left: parent.left; right: parent.right; leftMargin: Theme.paddingLarge; rightMargin: Theme.paddingLarge}
x: Theme.horizontalPageMargin
width: parent.width - 2*x
wrapMode: Text.WordWrap
color: Theme.highlightColor
linkColor: Theme.primaryColor
font.pixelSize: Theme.fontSizeSmall
onLinkActivated: {
Qt.openUrlExternally(link);
}
}

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2017 Michal Kosciesza <michal@mkiol.net>
Copyright (C) 2014-2019 Michal Kosciesza <michal@mkiol.net>
This file is part of Kaktus.
@ -21,6 +21,8 @@ import QtQuick 2.0
import Sailfish.Silica 1.0
Item {
width: Theme.itemSizeSmall
height: Theme.itemSizeSmall
property real space: Theme.paddingLarge
height: space
width: space
}

40
sailfish/src/info.h Normal file
View file

@ -0,0 +1,40 @@
/*
Copyright (C) 2014-2019 Michal Kosciesza <michal@mkiol.net>
This file is part of Kaktus.
Kaktus 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.
Kaktus 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 General Public License
along with Kaktus. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef INFO_H
#define INFO_H
namespace Kaktus {
static const char* APP_NAME = "Kaktus";
#ifdef SAILFISH
static const char* APP_VERSION = "2.6.1";
#elif ANDROID
static const char* APP_VERSION = "2.6.1";
#endif
static const char* AUTHOR = "Michal Kosciesza";
static const char* COPYRIGHT_YEAR = "2014-2019";
static const char* AUTHOR1 = "Renaud Casenave-Péré";
static const char* COPYRIGHT_YEAR1 = "2019";
static const char* SUPPORT_EMAIL = "kaktus@mkiol.net";
static const char* PAGE = "https://github.com/mkiol/kaktus";
static const char* LICENSE = "GNU General Public Licence version 3";
static const char* LICENSE_URL = "https://www.gnu.org/licenses/gpl-3.0.html";
}
#endif // INFO_H

View file

@ -1,5 +1,5 @@
/*
Copyright (C) 2014-2016 Michal Kosciesza <michal@mkiol.net>
Copyright (C) 2014-2019 Michal Kosciesza <michal@mkiol.net>
This file is part of Kaktus.
@ -36,6 +36,7 @@
#include <QColor>
#endif
#include "info.h"
#include "iconprovider.h"
#include "nviconprovider.h"
#include "databasemanager.h"
@ -46,16 +47,6 @@
#include "networkaccessmanagerfactory.h"
#include "ai.h"
static const char *APP_NAME = "Kaktus";
static const char *AUTHOR = "Michal Kosciesza <michal@mkiol.net>";
static const char *PAGE = "https://github.com/mkiol/kaktus";
#ifdef KAKTUS_LIGHT
static const char *VERSION = "2.6.1 (light edition)";
#else
static const char *VERSION = "2.6.1";
#endif
int main(int argc, char *argv[])
{
#ifdef SAILFISH
@ -80,13 +71,19 @@ int main(int argc, char *argv[])
app->setApplicationName(APP_NAME);
#endif
app->setApplicationDisplayName(APP_NAME);
app->setApplicationVersion(VERSION);
app->setApplicationDisplayName(Kaktus::APP_NAME);
app->setApplicationVersion(Kaktus::APP_VERSION);
context->setContextProperty("APP_NAME", APP_NAME);
context->setContextProperty("VERSION", VERSION);
context->setContextProperty("AUTHOR", AUTHOR);
context->setContextProperty("PAGE", PAGE);
context->setContextProperty("APP_NAME", Kaktus::APP_NAME);
context->setContextProperty("APP_VERSION", Kaktus::APP_VERSION);
context->setContextProperty("AUTHOR", Kaktus::AUTHOR);
context->setContextProperty("COPYRIGHT_YEAR", Kaktus::COPYRIGHT_YEAR);
context->setContextProperty("AUTHOR1", Kaktus::AUTHOR1);
context->setContextProperty("COPYRIGHT_YEAR1", Kaktus::COPYRIGHT_YEAR1);
context->setContextProperty("SUPPORT_EMAIL", Kaktus::SUPPORT_EMAIL);
context->setContextProperty("PAGE", Kaktus::PAGE);
context->setContextProperty("LICENSE", Kaktus::LICENSE);
context->setContextProperty("LICENSE_URL", Kaktus::LICENSE_URL);
engine->addImageProvider(QLatin1String("icons"), new IconProvider);
engine->addImageProvider(QLatin1String("nvicons"), new NvIconProvider);