diff options
author | dada513 <dada513@protonmail.com> | 2022-03-10 18:52:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-10 18:52:57 +0100 |
commit | c4a8fd353c3d2f72452f739ebc4aca764e974f11 (patch) | |
tree | 0418d2cd0ad01305d5a2074243c0181e68131876 /launcher | |
parent | 91524d6d6e75c56d9c36c05d35fb028cedb6ce66 (diff) | |
parent | d814e21f0d68b560d94cd69edb0b673a1507aa63 (diff) | |
download | PrismLauncher-c4a8fd353c3d2f72452f739ebc4aca764e974f11.tar.gz PrismLauncher-c4a8fd353c3d2f72452f739ebc4aca764e974f11.tar.bz2 PrismLauncher-c4a8fd353c3d2f72452f739ebc4aca764e974f11.zip |
Merge pull request #243 from dada513/mx_button
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/resources/multimc/multimc.qrc | 4 | ||||
-rw-r--r-- | launcher/resources/multimc/scalable/matrix.svg | 7 | ||||
-rw-r--r-- | launcher/ui/MainWindow.cpp | 18 | ||||
-rw-r--r-- | launcher/ui/MainWindow.h | 2 |
4 files changed, 30 insertions, 1 deletions
diff --git a/launcher/resources/multimc/multimc.qrc b/launcher/resources/multimc/multimc.qrc index ef29cf9b..d31885b9 100644 --- a/launcher/resources/multimc/multimc.qrc +++ b/launcher/resources/multimc/multimc.qrc @@ -246,9 +246,13 @@ <!-- placeholder when loading screenshot images --> <file>scalable/screenshot-placeholder.svg</file> + <!-- matrix logo --> + <file>scalable/matrix.svg</file> + <!-- discord logo icon thing. from discord. traced from bitmap --> <file>scalable/discord.svg</file> + <!-- instance icons --> <file>32x32/instances/chicken.png</file> <file>128x128/instances/chicken.png</file> diff --git a/launcher/resources/multimc/scalable/matrix.svg b/launcher/resources/multimc/scalable/matrix.svg new file mode 100644 index 00000000..237c55a2 --- /dev/null +++ b/launcher/resources/multimc/scalable/matrix.svg @@ -0,0 +1,7 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64"> + <g fill="#fff"> + <path d="M49.46 42.2h-5.32c-.178 0-.323-.145-.323-.323V30.91l-.074-1.808c-.047-.53-.173-.992-.376-1.376-.194-.367-.487-.664-.868-.883s-.93-.332-1.62-.332-1.238.13-1.647.382-.743.597-.976 1.01a4.21 4.21 0 0 0-.486 1.462c-.085.567-.128 1.15-.128 1.732v10.79c0 .178-.145.323-.323.323H32c-.178 0-.323-.145-.323-.323V31.02l-.037-1.69c-.024-.524-.124-1.013-.297-1.45-.164-.415-.43-.74-.814-.992s-.972-.378-1.752-.378c-.22 0-.527.053-.908.157-.368.1-.732.294-1.08.577s-.65.694-.904 1.235-.382 1.27-.382 2.167v11.24c0 .178-.144.323-.323.323h-5.32c-.178 0-.323-.145-.323-.323V22.515c0-.178.145-.322.323-.322h5.02c.178 0 .323.145.323.322V24.3c.618-.726 1.33-1.315 2.125-1.757 1.032-.574 2.225-.865 3.548-.865 1.265 0 2.44.25 3.5.743.934.44 1.68 1.17 2.224 2.18.556-.703 1.263-1.34 2.108-1.895 1.036-.682 2.274-1.028 3.68-1.028 1.048 0 2.036.13 2.937.387.917.263 1.715.69 2.373 1.267s1.18 1.348 1.548 2.278c.363.922.547 2.04.547 3.323v12.964c0 .178-.145.323-.323.323z" opacity=".5" /> + <path d="M24.88 22.515v2.623h.075c.7-.998 1.542-1.774 2.53-2.323s2.117-.824 3.39-.824c1.224 0 2.342.238 3.353.712s1.78 1.31 2.305 2.51c.574-.85 1.355-1.6 2.342-2.248s2.154-.974 3.504-.974c1.024 0 1.973.125 2.848.375s1.623.65 2.248 1.2 1.11 1.268 1.462 2.154.525 1.955.525 3.204v12.964h-5.32V30.91l-.075-1.836c-.05-.574-.187-1.073-.412-1.5s-.556-.762-.993-1.012-1.03-.374-1.78-.374-1.355.145-1.817.43-.824.663-1.087 1.124-.437.987-.524 1.574a12 12 0 0 0-.131 1.78v10.79H32V31.022l-.037-1.705c-.025-.562-.13-1.08-.32-1.556s-.5-.855-.937-1.143-1.08-.43-1.93-.43c-.25 0-.58.056-.993.17a3.3 3.3 0 0 0-1.199.637c-.388.313-.718.762-.993 1.35s-.412 1.355-.412 2.304v11.24h-5.32V22.515z" opacity=".5" /> + </g> + <path d="M1.432 6.084v51.833h3.73v1.244H0V4.84h5.162v1.243zm20.788 16.43v2.623h.075c.7-.998 1.542-1.774 2.53-2.323s2.117-.824 3.4-.824c1.224 0 2.342.238 3.353.712s1.78 1.3 2.305 2.5c.574-.85 1.355-1.6 2.342-2.248s2.154-.974 3.504-.974c1.024 0 1.973.125 2.848.375s1.623.65 2.248 1.2 1.1 1.268 1.462 2.154.525 1.955.525 3.204v12.964h-5.32V30.9l-.075-1.836c-.05-.574-.187-1.073-.412-1.5s-.556-.762-.993-1.012-1.03-.374-1.78-.374-1.355.145-1.817.43a3.12 3.12 0 0 0-1.087 1.124c-.263.46-.437.987-.524 1.574a12 12 0 0 0-.131 1.78v10.8h-5.32V31.022l-.037-1.705c-.025-.562-.13-1.08-.32-1.556s-.5-.855-.937-1.143-1.08-.43-1.93-.43c-.25 0-.58.056-.993.17a3.3 3.3 0 0 0-1.199.637c-.388.313-.718.762-.993 1.35s-.412 1.355-.412 2.304v11.24H17.2V22.515zm40.348 35.402V6.084h-3.73V4.84H64v54.32h-5.162v-1.244z" /> +</svg>
\ No newline at end of file diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index ad7227cc..2cb3c7fd 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -235,6 +235,7 @@ public: TranslatedToolButton helpMenuButton; TranslatedAction actionReportBug; TranslatedAction actionDISCORD; + TranslatedAction actionMATRIX; TranslatedAction actionREDDIT; TranslatedAction actionAbout; @@ -343,13 +344,23 @@ public: all_actions.append(&actionReportBug); helpMenu->addAction(actionReportBug); } + + if(!BuildConfig.MATRIX_URL.isEmpty()) { + actionMATRIX = TranslatedAction(MainWindow); + actionMATRIX->setObjectName(QStringLiteral("actionMATRIX")); + actionMATRIX->setIcon(APPLICATION->getThemedIcon("matrix")); + actionMATRIX.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Matrix")); + actionMATRIX.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 Matrix space")); + all_actions.append(&actionMATRIX); + helpMenu->addAction(actionMATRIX); + } if (!BuildConfig.DISCORD_URL.isEmpty()) { actionDISCORD = TranslatedAction(MainWindow); actionDISCORD->setObjectName(QStringLiteral("actionDISCORD")); actionDISCORD->setIcon(APPLICATION->getThemedIcon("discord")); actionDISCORD.setTextId(QT_TRANSLATE_NOOP("MainWindow", "Discord")); - actionDISCORD.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 discord voice chat.")); + actionDISCORD.setTooltipId(QT_TRANSLATE_NOOP("MainWindow", "Open %1 Discord guild.")); all_actions.append(&actionDISCORD); helpMenu->addAction(actionDISCORD); } @@ -1500,6 +1511,11 @@ void MainWindow::on_actionDISCORD_triggered() DesktopServices::openUrl(QUrl(BuildConfig.DISCORD_URL)); } +void MainWindow::on_actionMATRIX_triggered() +{ + DesktopServices::openUrl(QUrl(BuildConfig.MATRIX_URL)); +} + void MainWindow::on_actionChangeInstIcon_triggered() { if (!m_selectedInstance) diff --git a/launcher/ui/MainWindow.h b/launcher/ui/MainWindow.h index f6940ab0..bdbe81aa 100644 --- a/launcher/ui/MainWindow.h +++ b/launcher/ui/MainWindow.h @@ -73,6 +73,8 @@ private slots: void on_actionREDDIT_triggered(); + void on_actionMATRIX_triggered(); + void on_actionDISCORD_triggered(); void on_actionCopyInstance_triggered(); |