diff --git a/images/z1.0/icon-a-kaktus.png b/images/z1.0/icon-a-kaktus.png deleted file mode 100644 index 50b4e38..0000000 Binary files a/images/z1.0/icon-a-kaktus.png and /dev/null differ diff --git a/images/z1.0/icon-i-kaktus.png b/images/z1.0/icon-i-kaktus.png deleted file mode 100644 index 7025110..0000000 Binary files a/images/z1.0/icon-i-kaktus.png and /dev/null differ diff --git a/images/z1.25/icon-a-kaktus.png b/images/z1.25/icon-a-kaktus.png deleted file mode 100644 index 7025110..0000000 Binary files a/images/z1.25/icon-a-kaktus.png and /dev/null differ diff --git a/images/z1.25/icon-i-kaktus.png b/images/z1.25/icon-i-kaktus.png deleted file mode 100644 index a8b8c1f..0000000 Binary files a/images/z1.25/icon-i-kaktus.png and /dev/null differ diff --git a/images/z1.5-large/icon-a-kaktus.png b/images/z1.5-large/icon-a-kaktus.png deleted file mode 100644 index a8b8c1f..0000000 Binary files a/images/z1.5-large/icon-a-kaktus.png and /dev/null differ diff --git a/images/z1.5-large/icon-i-kaktus.png b/images/z1.5-large/icon-i-kaktus.png deleted file mode 100644 index 8224190..0000000 Binary files a/images/z1.5-large/icon-i-kaktus.png and /dev/null differ diff --git a/images/z1.5/icon-a-kaktus.png b/images/z1.5/icon-a-kaktus.png deleted file mode 100644 index a8b8c1f..0000000 Binary files a/images/z1.5/icon-a-kaktus.png and /dev/null differ diff --git a/images/z1.5/icon-i-kaktus.png b/images/z1.5/icon-i-kaktus.png deleted file mode 100644 index 8224190..0000000 Binary files a/images/z1.5/icon-i-kaktus.png and /dev/null differ diff --git a/images/z1.75/icon-a-kaktus.png b/images/z1.75/icon-a-kaktus.png deleted file mode 100644 index 8224190..0000000 Binary files a/images/z1.75/icon-a-kaktus.png and /dev/null differ diff --git a/images/z1.75/icon-i-kaktus.png b/images/z1.75/icon-i-kaktus.png deleted file mode 100644 index b9824e0..0000000 Binary files a/images/z1.75/icon-i-kaktus.png and /dev/null differ diff --git a/images/z2.0/icon-a-kaktus.png b/images/z2.0/icon-a-kaktus.png deleted file mode 100644 index b9824e0..0000000 Binary files a/images/z2.0/icon-a-kaktus.png and /dev/null differ diff --git a/images/z2.0/icon-i-kaktus.png b/images/z2.0/icon-i-kaktus.png deleted file mode 100644 index d46ffa9..0000000 Binary files a/images/z2.0/icon-i-kaktus.png and /dev/null differ diff --git a/qml/AboutPage.qml b/qml/AboutPage.qml index 61ccd8f..dedab51 100644 --- a/qml/AboutPage.qml +++ b/qml/AboutPage.qml @@ -1,21 +1,9 @@ -/* - Copyright (C) 2014-2019 Michal Kosciesza - - 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 . -*/ +/* Copyright (C) 2014-2022 Michal Kosciesza + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ import QtQuick 2.0 import Sailfish.Silica 1.0 @@ -23,7 +11,7 @@ import Sailfish.Silica 1.0 Page { id: root - property bool showBar: false + readonly property bool showBar: false allowedOrientations: { switch (settings.allowedOrientations) { @@ -52,12 +40,14 @@ Page { spacing: Theme.paddingLarge PageHeader { - title: qsTr("About") + title: qsTr("About %1").arg(APP_NAME) } Image { anchors.horizontalCenter: parent.horizontalCenter - source: "image://icons/icon-i-kaktus" + height: root.isPortrait ? Theme.itemSizeHuge : Theme.iconSizeLarge + width: root.isPortrait ? Theme.itemSizeHuge : Theme.iconSizeLarge + source: settings.appIcon() } InfoLabel { @@ -71,16 +61,17 @@ Page { text: qsTr("Version %1").arg(APP_VERSION); } - Button { - text: qsTr("Changelog") + Flow { anchors.horizontalCenter: parent.horizontalCenter - onClicked: pageStack.push(Qt.resolvedUrl("ChangelogPage.qml")) - } - - Button { - text: qsTr("Project website") - anchors.horizontalCenter: parent.horizontalCenter - onClicked: Qt.openUrlExternally(PAGE) + spacing: Theme.paddingLarge + Button { + text: qsTr("Project website") + onClicked: Qt.openUrlExternally(PAGE) + } + Button { + text: qsTr("Changes") + onClicked: pageStack.push(Qt.resolvedUrl("ChangelogPage.qml")) + } } SectionHeader { @@ -105,16 +96,23 @@ Page { PaddedLabel { horizontalAlignment: Text.AlignLeft - text: qsTr("Translations are provided by:") + textFormat: Text.StyledText + text: qsTr("%1 is developed as an open source project under %2.") + .arg(APP_NAME) + .arg("" + LICENSE + "") + } + + SectionHeader { + text: qsTr("Translators") } 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ş " + - "\nHeimen Stoffels \nRui Kon \nqwer_asew \nBérenger ARNAUD" + text: "Nathan Follens · Fri · Jozef Mlích · Carmen Fernández B. " + + "· Gökhan Kalayci · Fallaffel Box · Benjamin (schnubbbi) · R.G. Sidler " + + "· Koleesch · Fravaccaro · Petr Tsymbarovich · Andrey Getmantsev " + + "· Kiratonin · Алексей Дедун · mentaljam · José Jiménez · Mesut Aktaş " + + "· Heimen Stoffels · Rui Kon · qwer_asew · Bérenger ARNAUD" } PaddedLabel { @@ -131,7 +129,7 @@ Page { PaddedLabel { horizontalAlignment: Text.AlignLeft - text: "QHTTPServer \nReadability.js \nSimpleCrypt" + text: "QHTTPServer · Readability.js · SimpleCrypt" } Spacer {} diff --git a/qml/CoverPage.qml b/qml/CoverPage.qml index 24a0b62..ee8e376 100644 --- a/qml/CoverPage.qml +++ b/qml/CoverPage.qml @@ -1,21 +1,9 @@ -/* - Copyright (C) 2016 Michal Kosciesza - - 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 . -*/ +/* Copyright (C) 2016-2022 Michal Kosciesza + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ import QtQuick 2.1 import Sailfish.Silica 1.0 @@ -37,15 +25,13 @@ CoverBackground { } function connectFetcher() { - if (typeof fetcher === 'undefined') - return; + if (typeof fetcher === 'undefined') return; fetcher.progress.connect(fetcherProgress); fetcher.busyChanged.connect(fetcherBusyChanged); } function disconnectFetcher() { - if (typeof fetcher === 'undefined') - return; + if (typeof fetcher === 'undefined') return; fetcher.progress.disconnect(fetcherProgress); fetcher.busyChanged.disconnect(fetcherBusyChanged); } @@ -121,7 +107,7 @@ CoverBackground { } CoverPlaceholder { - text: settings.signedIn ? root.busy ? root.label : root.unreadLabel : qsTr("Not signed in") - icon.source: "image://icons/icon-a-kaktus" + text: settings.signedIn ? root.busy ? root.label : root.unreadLabel : APP_NAME + icon.source: settings.appIcon() } } diff --git a/qml/PageMenu.qml b/qml/PageMenu.qml index 771f6a1..ab529bf 100644 --- a/qml/PageMenu.qml +++ b/qml/PageMenu.qml @@ -31,7 +31,7 @@ PullDownMenu { property bool showNetwork: true MenuItem { - text: qsTr("About") + text: qsTr("About %1").arg(APP_NAME) visible: root.showAbout onClicked: { diff --git a/src/info.h b/src/info.h index 501e255..d1dbfde 100644 --- a/src/info.h +++ b/src/info.h @@ -17,7 +17,7 @@ static constexpr const char* APP_VERSION = "3.0.4"; static constexpr const char* AUTHOR = "Michal Kosciesza"; static constexpr const char* COPYRIGHT_YEAR = "2014-2022"; static constexpr const char* AUTHOR1 = "Renaud Casenave-Péré"; -static constexpr const char* COPYRIGHT_YEAR1 = "2019-2022"; +static constexpr const char* COPYRIGHT_YEAR1 = "2019"; static constexpr const char* SUPPORT_EMAIL = "kaktus@mkiol.net"; static constexpr const char* PAGE = "https://github.com/mkiol/kaktus"; static constexpr const char* LICENSE = "Mozilla Public License 2.0"; diff --git a/src/settings.cpp b/src/settings.cpp index df85433..6447b98 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -757,3 +757,9 @@ QString Settings::getImagesDir() const { if (d.exists() && d.isDir()) return dir; return QStandardPaths::writableLocation(QStandardPaths::PicturesLocation); } + +QUrl Settings::appIcon() const { + return QUrl::fromLocalFile( + QString(QStringLiteral("/usr/share/icons/hicolor/172x172/apps/%1.png")) + .arg(Kaktus::APP_BINARY_ID)); +} diff --git a/src/settings.h b/src/settings.h index bf40a6e..01eb352 100644 --- a/src/settings.h +++ b/src/settings.h @@ -12,6 +12,7 @@ #include #include #include +#include #include class QQmlContext; @@ -292,6 +293,7 @@ class Settings : public QSettings { QList viewModeHistory() const; Q_INVOKABLE QString pocketConsumerKey() const; + Q_INVOKABLE QUrl appIcon() const; signals: void offlineModeChanged();