mirror of https://github.com/mgba-emu/mgba.git
Qt: Add patrons for October
This commit is contained in:
parent
a067bca332
commit
f4798f9f04
|
@ -0,0 +1,7 @@
|
||||||
|
Trey Boyer
|
||||||
|
Christopher Cole
|
||||||
|
Philip Horton
|
||||||
|
Lucy
|
||||||
|
Joshua Minor
|
||||||
|
Rohit Nirmal
|
||||||
|
Yuri Kunde Schlesner
|
|
@ -9,6 +9,7 @@ extern "C" {
|
||||||
#include "core/version.h"
|
#include "core/version.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <QFile>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
|
|
||||||
using namespace QGBA;
|
using namespace QGBA;
|
||||||
|
@ -28,16 +29,48 @@ AboutScreen::AboutScreen(QWidget* parent)
|
||||||
tree = QLatin1String(projectVersion);
|
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.projectName->setText(QLatin1String(projectName));
|
||||||
m_ui.projectVersion->setText(QLatin1String(projectVersion));
|
m_ui.projectVersion->setText(QLatin1String(projectVersion));
|
||||||
QString gitInfo = m_ui.gitInfo->text();
|
|
||||||
gitInfo.replace("{gitBranch}", QLatin1String(gitBranch));
|
{
|
||||||
gitInfo.replace("{gitCommit}", QLatin1String(gitCommit));
|
QString gitInfo = m_ui.gitInfo->text();
|
||||||
m_ui.gitInfo->setText(gitInfo);
|
gitInfo.replace("{gitBranch}", QLatin1String(gitBranch));
|
||||||
QString description = m_ui.description->text();
|
gitInfo.replace("{gitCommit}", QLatin1String(gitCommit));
|
||||||
description.replace("{projectName}", QLatin1String(projectName));
|
m_ui.gitInfo->setText(gitInfo);
|
||||||
m_ui.description->setText(description);
|
}
|
||||||
QString extraLinks = m_ui.extraLinks->text();
|
|
||||||
extraLinks.replace("{gitBranch}", tree);
|
{
|
||||||
m_ui.extraLinks->setText(extraLinks);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>609</width>
|
<width>617</width>
|
||||||
<height>272</height>
|
<height>341</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -17,6 +17,34 @@
|
||||||
<property name="sizeConstraint">
|
<property name="sizeConstraint">
|
||||||
<enum>QLayout::SetFixedSize</enum>
|
<enum>QLayout::SetFixedSize</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<item row="4" column="1">
|
||||||
|
<widget class="QLabel" name="extraLinks">
|
||||||
|
<property name="text">
|
||||||
|
<string><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></string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="openExternalLinks">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLabel" name="gitInfo">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Branch: <tt>{gitBranch}</tt><br/>Revision: <tt>{gitCommit}</tt></string>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QLabel" name="projectName">
|
<widget class="QLabel" name="projectName">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
|
@ -34,7 +62,20 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0" colspan="4">
|
<item row="6" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="patronsHeader">
|
||||||
|
<property name="text">
|
||||||
|
<string>{projectName} would like to thank the following patrons from Patreon:</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0" colspan="4">
|
||||||
<widget class="QLabel" name="copyright">
|
<widget class="QLabel" name="copyright">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
|
@ -143,34 +184,19 @@ Game Boy Advance is a registered trademark of Nintendo Co., Ltd.</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="7" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="extraLinks">
|
<widget class="QLabel" name="patrons">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><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></string>
|
<string>{patrons}</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="openExternalLinks">
|
<property name="wordWrap">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLabel" name="gitInfo">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Branch: <tt>{gitBranch}</tt><br/>Revision: <tt>{gitCommit}</tt></string>
|
|
||||||
</property>
|
|
||||||
<property name="textInteractionFlags">
|
|
||||||
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|
|
@ -2,5 +2,6 @@
|
||||||
<qresource>
|
<qresource>
|
||||||
<file>../../../res/mgba-1024.png</file>
|
<file>../../../res/mgba-1024.png</file>
|
||||||
<file>../../../res/keymap.qpic</file>
|
<file>../../../res/keymap.qpic</file>
|
||||||
|
<file>../../../res/patrons.txt</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Loading…
Reference in New Issue