From 98c03ec991e7cdd7b5eb2f9073e8a15b28add915 Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Tue, 10 May 2022 17:11:16 +0200 Subject: [PATCH] about page --- electrum/gui/qml/components/About.qml | 90 +++++++++++++++++++ .../gui/qml/components/WalletMainView.qml | 9 ++ 2 files changed, 99 insertions(+) create mode 100644 electrum/gui/qml/components/About.qml diff --git a/electrum/gui/qml/components/About.qml b/electrum/gui/qml/components/About.qml new file mode 100644 index 000000000..b66453432 --- /dev/null +++ b/electrum/gui/qml/components/About.qml @@ -0,0 +1,90 @@ +import QtQuick 2.6 +import QtQuick.Layouts 1.0 +import QtQuick.Controls 2.0 +import QtQuick.Controls.Material 2.0 + +Pane { + property string title: qsTr("About Electrum") + + Flickable { + anchors.fill: parent + contentHeight: rootLayout.height + interactive: height < contentHeight + + GridLayout { + id: rootLayout + columns: 2 + width: parent.width + + Item { + Layout.columnSpan: 2 + Layout.alignment: Qt.AlignHCenter + Layout.preferredWidth: parent.width + Layout.preferredHeight: parent.width * 3/4 // reduce height, empty space in png + + Image { + id: electrum_logo + width: parent.width + height: width + source: '../../icons/electrum_presplash.png' + } + } + + Label { + text: qsTr('Version') + Layout.alignment: Qt.AlignRight + } + Label { + text: BUILD.electrum_version + } + Label { + text: qsTr('APK Version') + Layout.alignment: Qt.AlignRight + } + Label { + text: BUILD.apk_version + } + Label { + text: qsTr('Protocol version') + Layout.alignment: Qt.AlignRight + } + Label { + text: BUILD.protocol_version + } + Label { + text: qsTr('License') + Layout.alignment: Qt.AlignRight + } + Label { + text: qsTr('MIT License') + } + Label { + text: qsTr('Homepage') + Layout.alignment: Qt.AlignRight + } + Label { + text: qsTr('https://electrum.org') + textFormat: Text.RichText + onLinkActivated: Qt.openUrlExternally(link) + } + Label { + text: qsTr('Developers') + Layout.alignment: Qt.AlignRight + } + Label { + text: 'Thomas Voegtlin\nSomberNight\nSander van Grieken' + } + Item { + width: 1 + height: constants.paddingXLarge + Layout.columnSpan: 2 + } + Label { + text: qsTr('Distributed by Electrum Technologies GmbH') + Layout.columnSpan: 2 + Layout.alignment: Qt.AlignHCenter + } + } + } + +} diff --git a/electrum/gui/qml/components/WalletMainView.qml b/electrum/gui/qml/components/WalletMainView.qml index f41cb7055..4ff3600f8 100644 --- a/electrum/gui/qml/components/WalletMainView.qml +++ b/electrum/gui/qml/components/WalletMainView.qml @@ -44,6 +44,15 @@ Item { } } + MenuItem { + icon.color: 'transparent' + action: Action { + text: qsTr('About'); + onTriggered: menu.openPage(Qt.resolvedUrl('About.qml')) + icon.source: '../../icons/electrum.png' + } + } + function openPage(url) { stack.push(url) currentIndex = -1