Merge pull request #243 from dada513/mx_button
This commit is contained in:
commit
c4a8fd353c
@ -82,9 +82,14 @@ set(Launcher_BUG_TRACKER_URL "https://github.com/PolyMC/PolyMC/issues" CACHE STR
|
||||
# Translations Platform URL
|
||||
set(Launcher_TRANSLATIONS_URL "https://hosted.weblate.org/projects/polymc/polymc/" CACHE STRING "URL for the translations platform.")
|
||||
|
||||
# Matrix Space
|
||||
set(Launcher_MATRIX_URL "https://matrix.to/#/#polymc:polymc.org" CACHE STRING "URL to the Matrix Space")
|
||||
|
||||
# Discord URL
|
||||
set(Launcher_DISCORD_URL "https://discord.gg/Z52pwxWCHP" CACHE STRING "URL for the Discord guild.")
|
||||
|
||||
|
||||
|
||||
# Subreddit URL
|
||||
set(Launcher_SUBREDDIT_URL "" CACHE STRING "URL for the subreddit.")
|
||||
|
||||
|
@ -57,6 +57,7 @@ Config::Config()
|
||||
|
||||
BUG_TRACKER_URL = "@Launcher_BUG_TRACKER_URL@";
|
||||
TRANSLATIONS_URL = "@Launcher_TRANSLATIONS_URL@";
|
||||
MATRIX_URL = "@Launcher_MATRIX_URL@";
|
||||
DISCORD_URL = "@Launcher_DISCORD_URL@";
|
||||
SUBREDDIT_URL = "@Launcher_SUBREDDIT_URL@";
|
||||
}
|
||||
|
@ -95,6 +95,7 @@ public:
|
||||
|
||||
QString BUG_TRACKER_URL;
|
||||
QString TRANSLATIONS_URL;
|
||||
QString MATRIX_URL;
|
||||
QString DISCORD_URL;
|
||||
QString SUBREDDIT_URL;
|
||||
|
||||
|
@ -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>
|
||||
|
7
launcher/resources/multimc/scalable/matrix.svg
Normal file
7
launcher/resources/multimc/scalable/matrix.svg
Normal file
@ -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>
|
After Width: | Height: | Size: 2.5 KiB |
@ -235,6 +235,7 @@ public:
|
||||
TranslatedToolButton helpMenuButton;
|
||||
TranslatedAction actionReportBug;
|
||||
TranslatedAction actionDISCORD;
|
||||
TranslatedAction actionMATRIX;
|
||||
TranslatedAction actionREDDIT;
|
||||
TranslatedAction actionAbout;
|
||||
|
||||
@ -344,12 +345,22 @@ public:
|
||||
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)
|
||||
|
@ -73,6 +73,8 @@ private slots:
|
||||
|
||||
void on_actionREDDIT_triggered();
|
||||
|
||||
void on_actionMATRIX_triggered();
|
||||
|
||||
void on_actionDISCORD_triggered();
|
||||
|
||||
void on_actionCopyInstance_triggered();
|
||||
|
Loading…
Reference in New Issue
Block a user