From 8fcc44363078cfe0686ab88055bf125e353122a8 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sun, 5 Jan 2025 23:06:39 +0100 Subject: [PATCH] update-screen: add a support button --- utils/update-screen/UpdateScreen.cpp | 3 +++ utils/update-screen/main.qml | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/utils/update-screen/UpdateScreen.cpp b/utils/update-screen/UpdateScreen.cpp index 170bf9c..71ddb67 100644 --- a/utils/update-screen/UpdateScreen.cpp +++ b/utils/update-screen/UpdateScreen.cpp @@ -1,6 +1,7 @@ #include "UpdateScreen.hpp" #include +#include #include #include @@ -13,4 +14,6 @@ CUpdateScreen::CUpdateScreen(QObject* parent) : QObject(parent) { void CUpdateScreen::onButtonPress(QString buttonName) { if (buttonName == "quit") exit(0); + if (buttonName == "donate") + QDesktopServices::openUrl(QUrl("https://hyprland.org/support")); } diff --git a/utils/update-screen/main.qml b/utils/update-screen/main.qml index e0bb96e..bc97e9a 100644 --- a/utils/update-screen/main.qml +++ b/utils/update-screen/main.qml @@ -79,6 +79,13 @@ ApplicationWindow { Layout.leftMargin: 20 Layout.alignment: Qt.AlignRight + Button { + text: "Support the project" + onClicked: (e) => { + updateScreen.onButtonPress("donate"); + } + } + Button { text: "Don't show this when I update" onClicked: (e) => {