update-screen: add a support button

This commit is contained in:
Vaxry 2025-01-05 23:06:39 +01:00
parent c77109d7e1
commit 8fcc443630
2 changed files with 10 additions and 0 deletions

View file

@ -1,6 +1,7 @@
#include "UpdateScreen.hpp"
#include <print>
#include <QDesktopServices>
#include <hyprutils/string/String.hpp>
#include <hyprutils/os/Process.hpp>
@ -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"));
}

View file

@ -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) => {