Skip to content

Commit 8fcc443

Browse files
committed
update-screen: add a support button
1 parent c77109d commit 8fcc443

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

utils/update-screen/UpdateScreen.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "UpdateScreen.hpp"
22

33
#include <print>
4+
#include <QDesktopServices>
45

56
#include <hyprutils/string/String.hpp>
67
#include <hyprutils/os/Process.hpp>
@@ -13,4 +14,6 @@ CUpdateScreen::CUpdateScreen(QObject* parent) : QObject(parent) {
1314
void CUpdateScreen::onButtonPress(QString buttonName) {
1415
if (buttonName == "quit")
1516
exit(0);
17+
if (buttonName == "donate")
18+
QDesktopServices::openUrl(QUrl("https://hyprland.org/support"));
1619
}

utils/update-screen/main.qml

+7
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,13 @@ ApplicationWindow {
7979
Layout.leftMargin: 20
8080
Layout.alignment: Qt.AlignRight
8181

82+
Button {
83+
text: "Support the project"
84+
onClicked: (e) => {
85+
updateScreen.onButtonPress("donate");
86+
}
87+
}
88+
8289
Button {
8390
text: "Don't show this when I update"
8491
onClicked: (e) => {

0 commit comments

Comments
 (0)