Skip to content

Commit

Permalink
DolphinQt: Rewrite 'About' dialog to match the new WX one.
Browse files Browse the repository at this point in the history
  • Loading branch information
waddlesplash committed Aug 13, 2015
1 parent a5c868d commit 4f0962b
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 58 deletions.
11 changes: 7 additions & 4 deletions Source/Core/DolphinQt/AboutDialog.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2014 Dolphin Emulator Project
// Copyright 2015 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

Expand All @@ -11,19 +11,22 @@
#include "Common/StdMakeUnique.h"

#include "DolphinQt/AboutDialog.h"
#include "DolphinQt/Utils/Resources.h"
#include "DolphinQt/Utils/Utils.h"

DAboutDialog::DAboutDialog(QWidget* parent_widget)
: QDialog(parent_widget)
{
setWindowModality(Qt::WindowModal);
setAttribute(Qt::WA_DeleteOnClose);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);

m_ui = std::make_unique<Ui::DAboutDialog>();
m_ui->setupUi(this);
m_ui->label->setText(m_ui->label->text().arg(SC(scm_desc_str),
SL("2014"), SC(scm_branch_str), SC(scm_rev_git_str),
SL(__DATE__), SL(__TIME__)));
m_ui->lblGitRev->setText(SC(scm_desc_str));
m_ui->lblGitInfo->setText(m_ui->lblGitInfo->text().arg(SC(scm_branch_str), SC(scm_rev_git_str),
SL(__DATE__), SL(__TIME__)));
m_ui->lblLogo->setPixmap(Resources::GetPixmap(Resources::DOLPHIN_LOGO_LARGE));
}

DAboutDialog::~DAboutDialog()
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/DolphinQt/AboutDialog.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2014 Dolphin Emulator Project
// Copyright 2015 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

Expand Down
170 changes: 117 additions & 53 deletions Source/Core/DolphinQt/AboutDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,80 +6,144 @@
<rect>
<x>0</x>
<y>0</y>
<width>504</width>
<height>458</height>
<width>535</width>
<height>273</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>About Dolphin</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<layout class="QGridLayout" name="gridLayout">
<property name="horizontalSpacing">
<number>18</number>
</property>
<property name="verticalSpacing">
<number>10</number>
</property>
<item row="5" column="1">
<widget class="QLabel" name="lblLicenseAuthorsSupport">
<property name="text">
<string>&lt;big&gt;&lt;b&gt;Dolphin&lt;/b&gt;&lt;/big&gt; %1&lt;br&gt;
© 2003-%2 Dolphin Team&lt;br&gt;
Branch: %3&lt;br&gt;
Revision: %4&lt;br&gt;
Compiled: %5 @ %6&lt;br&gt;
Dolphin is a GameCube/Wii emulator, which was originally written by&lt;br&gt;F|RES and ector. Today Dolphin is an open source project with many&lt;br&gt; contributors, too many to list. If interested, just go check out &lt;a href=&quot;https://github.com/dolphin-emu/dolphin&quot;&gt;the project&lt;br&gt;page&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
Special thanks to Bushing, Costis, CrowTRobo, Marcan, Segher, Titanik,&lt;br&gt;or9, and Hotquik for their reverse engineering and docs/demos.&lt;br&gt;
&lt;br&gt;
Big thanks to Gilles Mouchard whose Microlib PPC emulator gave our&lt;br&gt; development a kickstart.&lt;br&gt;
&lt;br&gt;
Thanks to Frank Wille for his PowerPC disassembler, which or9 and we&lt;br&gt; modified to include Gekko specifics.&lt;br&gt;
&lt;br&gt;
Thanks to hcs/destop for their GC ADPCM decoder.&lt;br&gt;
&lt;br&gt;
We are not affiliated with Nintendo in any way. GameCube and Wii are&lt;br&gt; trademarks of Nintendo. This emulator should not be used to play games&lt;br&gt;you do not legally own.</string>
<string>&lt;a href=&quot;https://github.com/dolphin-emu/dolphin/blob/master/license.txt&quot;&gt;License&lt;/a&gt; | &lt;a href=&quot;https://github.com/dolphin-emu/dolphin/graphs/contributors&quot;&gt;Authors&lt;/a&gt; | &lt;a href=&quot;https://forums.dolphin-emu.org/&quot;&gt;Support&lt;/a&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="lblGitInfo">
<property name="font">
<font>
<pointsize>8</pointsize>
</font>
</property>
<property name="text">
<string>Branch: %1
Revision: %2
Compiled: %3 @ %4</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="6">
<widget class="QLabel" name="lblLogo">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="lblChkForUpdates">
<property name="text">
<string>Check for updates: &lt;a href=&quot;https://dolphin-emu.org/download&quot;&gt;dolphin-emu.org/download&lt;/a&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<item row="0" column="1">
<widget class="QLabel" name="lblDolphin">
<property name="font">
<font>
<pointsize>28</pointsize>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Dolphin</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="QLabel" name="lblFinePrint">
<property name="font">
<font>
<pointsize>7</pointsize>
</font>
</property>
<property name="text">
<string>© 2003-2015+ Dolphin Team. “GameCube” and “Wii” are trademarks of Nintendo. Dolphin is not affiliated with Nintendo in any way.</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="lblGitRev">
<property name="font">
<font>
<weight>75</weight>
<italic>false</italic>
<bold>true</bold>
</font>
</property>
<property name="text">
<string notr="true">&lt;git shortrev&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLabel" name="lblAbout">
<property name="text">
<string>Dolphin is a free and open-source GameCube and Wii emulator.
This software should not be used to play games you do not legally own.</string>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Ok</set>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>DAboutDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
<connections/>
</ui>

0 comments on commit 4f0962b

Please sign in to comment.