diff --git a/res/patrons.txt b/res/patrons.txt new file mode 100644 index 000000000..91e42258b --- /dev/null +++ b/res/patrons.txt @@ -0,0 +1,7 @@ +Trey Boyer +Christopher Cole +Philip Horton +Lucy +Joshua Minor +Rohit Nirmal +Yuri Kunde Schlesner \ No newline at end of file diff --git a/src/platform/qt/AboutScreen.cpp b/src/platform/qt/AboutScreen.cpp index 99c5aa2fd..e2743ce4e 100644 --- a/src/platform/qt/AboutScreen.cpp +++ b/src/platform/qt/AboutScreen.cpp @@ -9,6 +9,7 @@ extern "C" { #include "core/version.h" } +#include #include using namespace QGBA; @@ -28,16 +29,48 @@ AboutScreen::AboutScreen(QWidget* parent) tree = QLatin1String(projectVersion); } + QFile patronFile(":/res/patrons.txt"); + QStringList patronList; + patronFile.open(QIODevice::ReadOnly | QIODevice::Text); + while (true) { + QByteArray line = patronFile.readLine(); + if (line.isEmpty()) { + break; + } + patronList.append(QString::fromUtf8(line).trimmed()); + } + m_ui.projectName->setText(QLatin1String(projectName)); m_ui.projectVersion->setText(QLatin1String(projectVersion)); - QString gitInfo = m_ui.gitInfo->text(); - gitInfo.replace("{gitBranch}", QLatin1String(gitBranch)); - gitInfo.replace("{gitCommit}", QLatin1String(gitCommit)); - m_ui.gitInfo->setText(gitInfo); - QString description = m_ui.description->text(); - description.replace("{projectName}", QLatin1String(projectName)); - m_ui.description->setText(description); - QString extraLinks = m_ui.extraLinks->text(); - extraLinks.replace("{gitBranch}", tree); - m_ui.extraLinks->setText(extraLinks); + + { + QString gitInfo = m_ui.gitInfo->text(); + gitInfo.replace("{gitBranch}", QLatin1String(gitBranch)); + gitInfo.replace("{gitCommit}", QLatin1String(gitCommit)); + m_ui.gitInfo->setText(gitInfo); + } + + { + QString description = m_ui.description->text(); + description.replace("{projectName}", QLatin1String(projectName)); + m_ui.description->setText(description); + } + + { + QString extraLinks = m_ui.extraLinks->text(); + extraLinks.replace("{gitBranch}", tree); + m_ui.extraLinks->setText(extraLinks); + } + + { + QString patronsHeader = m_ui.patronsHeader->text(); + patronsHeader.replace("{projectName}", QLatin1String(projectName)); + m_ui.patronsHeader->setText(patronsHeader); + } + + { + QString patrons = m_ui.patrons->text(); + patrons.replace("{patrons}", patronList.join(" • ")); + m_ui.patrons->setText(patrons); + } } diff --git a/src/platform/qt/AboutScreen.ui b/src/platform/qt/AboutScreen.ui index ac8f9b917..71bee0960 100644 --- a/src/platform/qt/AboutScreen.ui +++ b/src/platform/qt/AboutScreen.ui @@ -6,8 +6,8 @@ 0 0 - 609 - 272 + 617 + 341 @@ -17,6 +17,34 @@ QLayout::SetFixedSize + + + + <a href="http://mgba.io/">Website</a> • <a href="https://forums.mgba.io/">Forums / Support</a> • <a href="https://patreon.com/mgba">Donate</a> • <a href="https://github.com/mgba-emu/mgba/tree/{gitBranch}">Source</a> + + + Qt::AlignCenter + + + true + + + + + + + + 10 + + + + Branch: <tt>{gitBranch}</tt><br/>Revision: <tt>{gitCommit}</tt> + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + @@ -34,7 +62,20 @@ - + + + + {projectName} would like to thank the following patrons from Patreon: + + + Qt::AlignCenter + + + true + + + + @@ -143,34 +184,19 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd. - - + + - <a href="http://mgba.io/">Website</a> • <a href="https://forums.mgba.io/">Forums / Support</a> • <a href="https://patreon.com/mgba">Donate</a> • <a href="https://github.com/mgba-emu/mgba/tree/{gitBranch}">Source</a> + {patrons} Qt::AlignCenter - + true - - - - - 10 - - - - Branch: <tt>{gitBranch}</tt><br/>Revision: <tt>{gitCommit}</tt> - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse - - - diff --git a/src/platform/qt/resources.qrc b/src/platform/qt/resources.qrc index 8efb247f3..1629b7eaf 100644 --- a/src/platform/qt/resources.qrc +++ b/src/platform/qt/resources.qrc @@ -2,5 +2,6 @@ ../../../res/mgba-1024.png ../../../res/keymap.qpic + ../../../res/patrons.txt