Skip to content

Commit

Permalink
About box update
Browse files Browse the repository at this point in the history
  • Loading branch information
nzeemin committed Jan 2, 2024
1 parent 9107c1a commit 07fbe34
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ jobs:
- name: Linux artefact
uses: actions/upload-artifact@v3
with:
name: AppImage
name: DMG
path: ${{ env.SOURCE_DIR }}/emulator/*.dmg
2 changes: 1 addition & 1 deletion emulator/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int main(int argc, char *argv[])
g_Application = &application;

// QTranslator translator;
// translator.load("ukncbtl_en.tr");
// translator.load(QLocale::Russian, "ukncbtl_ru.qm");
// application.installTranslator(&translator);

QSettings settings(QSettings::IniFormat, QSettings::UserScope, "Back to Life", "UKNCBTL");
Expand Down
19 changes: 12 additions & 7 deletions emulator/qdialogs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,37 +50,42 @@ QAboutDialog::QAboutDialog(QWidget * parent)
: QDialog(parent)
{
setWindowTitle(tr("About"));
setMinimumSize(440, 300);
setMinimumSize(480, 340);

QLabel * logoLabel = new QLabel();
logoLabel->setPixmap(QPixmap(":/images/ukncbtl.png"));

QLabel * versionLabel = new QLabel(tr(
"UKNCBTL Qt Version 1.0\nCopyright (C) 2007-2023\n"));
"UKNCBTL Qt Version 1.0\nCopyright (C) 2007-2024\n"));

QLabel * authorsLabel = new QLabel(tr(
"Authors:\r\nNikita Zimin\nFelix Lazarev\nAlexey Kisly\n\n"
"Special thanks to:\nArseny Gordin"));

QLabel * linkLabel = new QLabel(
"<a href=\"https://github.com/nzeemin/ukncbtl-qt\">https://github.com/nzeemin/ukncbtl-qt</a>");
"<a href=\"https://github.com/nzeemin/ukncbtl-qt\">https://github.com/nzeemin/ukncbtl-qt</a>");
linkLabel->setOpenExternalLinks(true);

QLabel * disclamerLabel = new QLabel(tr(
"This program is provided by authors and contributors AS IS, with absolutely no warranty of any kind. Please use it on your own risk."));
disclamerLabel->setWordWrap(true);

QLabel * bottomLabel = new QLabel(
tr("Build date:\t%1 %2\nQt version:\t%3").arg(__DATE__).arg(__TIME__).arg(QT_VERSION_STR));

QDialogButtonBox * buttonBox = new QDialogButtonBox(QDialogButtonBox::Close);
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);

QGridLayout * layout = new QGridLayout(this);
layout->addWidget(logoLabel, 0, 0, 4, 1, Qt::AlignTop);
layout->addWidget(logoLabel, 0, 0, 5, 1, Qt::AlignTop);
layout->addWidget(versionLabel, 0, 1);
layout->addWidget(authorsLabel, 1, 1);
layout->addWidget(linkLabel, 2, 1);
layout->addWidget(bottomLabel, 3, 1);
layout->addWidget(buttonBox, 4, 1);
layout->addWidget(disclamerLabel, 3, 1);
layout->addWidget(bottomLabel, 4, 1);
layout->addWidget(buttonBox, 5, 1);
layout->setColumnMinimumWidth(0, 136);
layout->setColumnMinimumWidth(1, 220);
layout->setColumnMinimumWidth(1, 250);

setLayout(layout);
}
Expand Down

0 comments on commit 07fbe34

Please # to comment.