Skip to content

Commit

Permalink
update-screen: add a support button
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Jan 5, 2025
1 parent c77109d commit 8fcc443
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/update-screen/UpdateScreen.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "UpdateScreen.hpp"

#include <print>
#include <QDesktopServices>

#include <hyprutils/string/String.hpp>
#include <hyprutils/os/Process.hpp>
Expand All @@ -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"));
}
7 changes: 7 additions & 0 deletions utils/update-screen/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 8fcc443

Please sign in to comment.