mirror of
https://github.com/hyprwm/hyprland-qtutils.git
synced 2025-01-29 06:19:49 +01:00
update-screen: add a support button
This commit is contained in:
parent
c77109d7e1
commit
8fcc443630
2 changed files with 10 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
#include "UpdateScreen.hpp"
|
#include "UpdateScreen.hpp"
|
||||||
|
|
||||||
#include <print>
|
#include <print>
|
||||||
|
#include <QDesktopServices>
|
||||||
|
|
||||||
#include <hyprutils/string/String.hpp>
|
#include <hyprutils/string/String.hpp>
|
||||||
#include <hyprutils/os/Process.hpp>
|
#include <hyprutils/os/Process.hpp>
|
||||||
|
@ -13,4 +14,6 @@ CUpdateScreen::CUpdateScreen(QObject* parent) : QObject(parent) {
|
||||||
void CUpdateScreen::onButtonPress(QString buttonName) {
|
void CUpdateScreen::onButtonPress(QString buttonName) {
|
||||||
if (buttonName == "quit")
|
if (buttonName == "quit")
|
||||||
exit(0);
|
exit(0);
|
||||||
|
if (buttonName == "donate")
|
||||||
|
QDesktopServices::openUrl(QUrl("https://hyprland.org/support"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,13 @@ ApplicationWindow {
|
||||||
Layout.leftMargin: 20
|
Layout.leftMargin: 20
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Support the project"
|
||||||
|
onClicked: (e) => {
|
||||||
|
updateScreen.onButtonPress("donate");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
text: "Don't show this when I update"
|
text: "Don't show this when I update"
|
||||||
onClicked: (e) => {
|
onClicked: (e) => {
|
||||||
|
|
Loading…
Reference in a new issue