From 18fa7c28327f58f3f778df9c42b8e2fbc17554d6 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Wed, 9 Sep 2020 21:49:45 -0700 Subject: [PATCH] Add Discord button in Settings --- app/gui/main.qml | 20 ++++++++++++++++++++ app/res/Discord-Logo-White.svg | 1 + app/resources.qrc | 1 + 3 files changed, 22 insertions(+) create mode 100644 app/res/Discord-Logo-White.svg diff --git a/app/gui/main.qml b/app/gui/main.qml index a613be2f..2025985d 100644 --- a/app/gui/main.qml +++ b/app/gui/main.qml @@ -230,6 +230,26 @@ ApplicationWindow { verticalAlignment: Qt.AlignVCenter } + NavigableToolButton { + id: discordButton + visible: SystemProperties.hasBrowser && + stackView.currentItem.objectName === "Settings" + + iconSource: "qrc:/res/Discord-Logo-White.svg" + + ToolTip.delay: 1000 + ToolTip.timeout: 3000 + ToolTip.visible: hovered + ToolTip.text: "Join our community on Discord" + + // TODO need to make sure browser is brought to foreground. + onClicked: Qt.openUrlExternally("https://moonlight-stream.org/discord"); + + Keys.onDownPressed: { + stackView.currentItem.forceActiveFocus(Qt.TabFocus) + } + } + NavigableToolButton { id: addPcButton visible: stackView.currentItem.objectName === "Computers" diff --git a/app/res/Discord-Logo-White.svg b/app/res/Discord-Logo-White.svg new file mode 100644 index 00000000..4613aa9a --- /dev/null +++ b/app/res/Discord-Logo-White.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/resources.qrc b/app/resources.qrc index 97a3ec18..fcf568d3 100644 --- a/app/resources.qrc +++ b/app/resources.qrc @@ -16,6 +16,7 @@ res/baseline-help_outline-24px.svg res/baseline-error_outline-24px.svg res/baseline-check_circle_outline-24px.svg + res/Discord-Logo-White.svg SDL_GameControllerDB/gamecontrollerdb.txt