diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-09-30 23:37:32 +0200 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-11-23 21:51:11 +0100 |
commit | 79d25833bfd261c36d954cf57845e5a416aaf849 (patch) | |
tree | 6b24dddc7d396e6a0cc5da3ab098ba459e836a5d /gui/components/MainView.qml | |
parent | d7e65d5cd3ca87b7ebc11cc5f6e9bfd4e9cefbfd (diff) |
[ui] size tweaks and new assets
plus work on the systray menu
Diffstat (limited to 'gui/components/MainView.qml')
-rw-r--r-- | gui/components/MainView.qml | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/gui/components/MainView.qml b/gui/components/MainView.qml index bae34fb..95bb212 100644 --- a/gui/components/MainView.qml +++ b/gui/components/MainView.qml @@ -4,6 +4,8 @@ import QtQuick.Dialogs 1.2 import QtQuick.Controls.Material 2.1 import QtQuick.Layouts 1.14 +import "../themes/themes.js" as Theme + Page { StackView { @@ -90,11 +92,20 @@ Page { id: footer } + Keys.onPressed: { + // shortcuts for avid users :) + // bug: doesnt work until the stack is pushed once + if (event.key == Qt.Key_G && stackView.depth == 1) { + console.debug("Open Locations") + stackView.push("Locations.qml") + } + } + Dialog { id: donateDialog - width: 350 + width: root.appWidth title: qsTr("Please donate!") - standardButtons: Dialog.Ok + standardButtons: Dialog.Yes | Dialog.No Text { id: donateText @@ -107,7 +118,7 @@ Page { horizontalCenter: parent.horizontalCenter } font.pixelSize: 12 - text: qsTr("This service is paid for entirely by donations from users like you. The cost of running the VPN is approximately 5 USD per person every month, but every little bit counts.") + text: qsTr("This service is paid for entirely by donations from users like you. The cost of running the VPN is approximately 5 USD per person every month, but every little bit counts. Do you want to donate now?") } Label { @@ -118,26 +129,32 @@ Page { horizontalCenter: parent.horizontalCenter } font.pixelSize: 14 + textFormat: Text.RichText text: getLink(ctx.donateURL) onLinkActivated: Qt.openUrlExternally(ctx.donateURL) } Image { - height: 50 + height: 40 source: "../resources/donate.svg" fillMode: Image.PreserveAspectFit anchors { topMargin: 20 top: donateURL.bottom + bottomMargin: 50 horizontalCenter: parent.horizontalCenter } } - onAccepted: Qt.openUrlExternally(ctx.donateURL) + onYes: Qt.openUrlExternally(ctx.donateURL) } function getLink(url) { - return "<a href='#'>" + url + "</a>" + return "<style>a:link {color:'" + Theme.blue + "'; }</style><a href='#'>" + url + "</a>" + } + + Component.onCompleted: { + root.openDonateDialog.connect(donateDialog.open) } } |