diff --git a/src/duckstation-qt/CMakeLists.txt b/src/duckstation-qt/CMakeLists.txt index 02105ba4a..6dc18d695 100644 --- a/src/duckstation-qt/CMakeLists.txt +++ b/src/duckstation-qt/CMakeLists.txt @@ -4,6 +4,8 @@ set(CMAKE_AUTOUIC ON) add_executable(duckstation-qt resources/icons.qrc + aboutdialog.cpp + aboutdialog.h advancedsettingswidget.cpp advancedsettingswidget.h advancedsettingswidget.ui diff --git a/src/duckstation-qt/aboutdialog.cpp b/src/duckstation-qt/aboutdialog.cpp new file mode 100644 index 000000000..2ab7b5538 --- /dev/null +++ b/src/duckstation-qt/aboutdialog.cpp @@ -0,0 +1,20 @@ +#include "aboutdialog.h" +#include "qtutils.h" +#include "scmversion/scmversion.h" +#include +#include + +AboutDialog::AboutDialog(QWidget* parent /* = nullptr */) : QDialog(parent) +{ + m_ui.setupUi(this); + + setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); + setFixedSize(geometry().width(), geometry().height()); + + m_ui.scmversion->setText(tr("%1 (%2)").arg(QString(g_scm_tag_str)).arg(QString(g_scm_branch_str))); + + m_ui.description->setTextInteractionFlags(Qt::TextBrowserInteraction); + m_ui.description->setOpenExternalLinks(true); +} + +AboutDialog::~AboutDialog() = default; diff --git a/src/duckstation-qt/aboutdialog.h b/src/duckstation-qt/aboutdialog.h new file mode 100644 index 000000000..bc27484b2 --- /dev/null +++ b/src/duckstation-qt/aboutdialog.h @@ -0,0 +1,17 @@ +#pragma once + +#include "ui_aboutdialog.h" +#include + +class AboutDialog final : public QDialog +{ + Q_OBJECT + +public: + explicit AboutDialog(QWidget* parent = nullptr); + ~AboutDialog(); + +private: + Ui::AboutDialog m_ui; + +}; diff --git a/src/duckstation-qt/aboutdialog.ui b/src/duckstation-qt/aboutdialog.ui new file mode 100644 index 000000000..d71b856be --- /dev/null +++ b/src/duckstation-qt/aboutdialog.ui @@ -0,0 +1,138 @@ + + + AboutDialog + + + + 0 + 0 + 600 + 300 + + + + About DuckStation + + + + :/icons/duck.png:/icons/duck.png + + + + + + + QLayout::SetDefaultConstraint + + + 1 + + + 1 + + + 1 + + + 1 + + + + + + 260 + 260 + + + + + + + :/icons/duck.png + + + Qt::AlignCenter + + + + + + + Qt::Vertical + + + + 17 + 156 + + + + + + + + + + + 9 + + + 9 + + + 9 + + + 9 + + + 9 + + + + + + 14 + 50 + false + + + + DuckStation + + + + + + + + + + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">DuckStation is a free and open-source simulator/emulator of the Sony PlayStation<span style=" vertical-align:super;">TM</span> console, focusing on playability, speed, and long-term maintainability.</p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Authors</span>:</p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> Connor McLaughlin &lt;stenzek@gmail.com&gt;</p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Duck icon by <a href="https://icons8.com/icon/74847/platforms.undefined.short-title"><span style=" text-decoration: underline; color:#0057ae;">icons8</span></a></p> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="https://github.com/stenzek/duckstation/blob/master/LICENSE"><span style=" text-decoration: underline; color:#0057ae;">License</span></a> | <a href="https://github.com/stenzek/duckstation"><span style=" text-decoration: underline; color:#0057ae;">GitHub</span></a> | <a href="https://discord.gg/Buktv3t"><span style=" text-decoration: underline; color:#0057ae;">Discord</span></a></p></body></html> + + + true + + + + + + + + + + + + diff --git a/src/duckstation-qt/duckstation-qt.vcxproj b/src/duckstation-qt/duckstation-qt.vcxproj index 0491e02e6..58664bb5f 100644 --- a/src/duckstation-qt/duckstation-qt.vcxproj +++ b/src/duckstation-qt/duckstation-qt.vcxproj @@ -35,6 +35,7 @@ + @@ -60,6 +61,7 @@ + @@ -108,6 +110,9 @@ + + Document + Document @@ -142,6 +147,7 @@ + diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index 38b0ccfc5..8b6bceea3 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -3,6 +3,7 @@ #include "core/game_list.h" #include "core/settings.h" #include "core/system.h" +#include "aboutdialog.h" #include "gamelistsettingswidget.h" #include "gamelistwidget.h" #include "gamepropertiesdialog.h" @@ -296,7 +297,11 @@ void MainWindow::onDiscordServerActionTriggered() QtUtils::OpenURL(this, "https://discord.gg/Buktv3t"); } -void MainWindow::onAboutActionTriggered() {} +void MainWindow::onAboutActionTriggered() +{ + AboutDialog about(this); + about.exec(); +} void MainWindow::onGameListEntrySelected(const GameListEntry* entry) {