mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 23:00:04 +00:00
parent
84b214e39e
commit
1efc311a86
7 changed files with 223 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include "about_dialog.hpp"
|
||||
#include "ui_about_dialog.h"
|
||||
#include <scwx/qt/main/versions.hpp>
|
||||
#include <scwx/qt/manager/resource_manager.hpp>
|
||||
|
||||
#include <QFontDatabase>
|
||||
|
|
@ -31,6 +32,28 @@ AboutDialog::AboutDialog(QWidget* parent) :
|
|||
QFontDatabase::applicationFontFamilies(titleFontId).at(0);
|
||||
QFont titleFont(titleFontFamily, 14);
|
||||
ui->titleLabel->setFont(titleFont);
|
||||
|
||||
QString repositoryUrl =
|
||||
QString("https://github.com/dpaulat/supercell-wx/tree/%1")
|
||||
.arg(QString::fromStdString(main::kCommitString_));
|
||||
|
||||
// Remove +dirty from the URL
|
||||
qsizetype delimiter = repositoryUrl.indexOf('+');
|
||||
if (delimiter != -1)
|
||||
{
|
||||
repositoryUrl = repositoryUrl.left(delimiter);
|
||||
}
|
||||
|
||||
ui->versionLabel->setText(
|
||||
tr("Version %1").arg(QString::fromStdString(main::kVersionString_)));
|
||||
ui->revisionLabel->setText(
|
||||
tr("Git Revision <a href=\"%1\">%2</a>")
|
||||
.arg(repositoryUrl)
|
||||
.arg(QString::fromStdString(main::kCommitString_)));
|
||||
ui->copyrightLabel->setText(
|
||||
tr("Copyright \302\251 2021-%1 Dan Paulat").arg(main::kCopyrightYear_));
|
||||
|
||||
ui->revisionLabel->setOpenExternalLinks(true);
|
||||
}
|
||||
|
||||
AboutDialog::~AboutDialog()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue