mirror of
https://github.com/hyprwm/hyprland-qtutils.git
synced 2025-01-27 18:09:48 +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 <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"));
|
||||
}
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue