diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-08-20 12:50:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-20 12:50:25 +0200 |
commit | 6e086eb808bf1442de51c6d097e6235d818b35c6 (patch) | |
tree | 3f5bbd7060c9aaa7fabf5152a7fd540cbc86505c /launcher/ui | |
parent | 7e8644430c644ca01f891639b0de9592d9d267c5 (diff) | |
parent | 1175461030f7bd90b69cb622f547879d76b54f3d (diff) | |
download | PrismLauncher-6e086eb808bf1442de51c6d097e6235d818b35c6.tar.gz PrismLauncher-6e086eb808bf1442de51c6d097e6235d818b35c6.tar.bz2 PrismLauncher-6e086eb808bf1442de51c6d097e6235d818b35c6.zip |
Merge pull request #992 from Scrumplex/refactor-version
Diffstat (limited to 'launcher/ui')
-rw-r--r-- | launcher/ui/dialogs/AboutDialog.cpp | 11 | ||||
-rw-r--r-- | launcher/ui/dialogs/AboutDialog.ui | 20 |
2 files changed, 26 insertions, 5 deletions
diff --git a/launcher/ui/dialogs/AboutDialog.cpp b/launcher/ui/dialogs/AboutDialog.cpp index c5367d5b..743c34f1 100644 --- a/launcher/ui/dialogs/AboutDialog.cpp +++ b/launcher/ui/dialogs/AboutDialog.cpp @@ -147,10 +147,15 @@ AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDia else ui->platformLabel->setVisible(false); - if (BuildConfig.VERSION_BUILD >= 0) - ui->buildNumLabel->setText(tr("Build Number") +": " + QString::number(BuildConfig.VERSION_BUILD)); + if (!BuildConfig.GIT_COMMIT.isEmpty()) + ui->commitLabel->setText(tr("Commit: %1").arg(BuildConfig.GIT_COMMIT)); else - ui->buildNumLabel->setVisible(false); + ui->commitLabel->setVisible(false); + + if (!BuildConfig.BUILD_DATE.isEmpty()) + ui->buildDateLabel->setText(tr("Build date: %1").arg(BuildConfig.BUILD_DATE)); + else + ui->buildDateLabel->setVisible(false); if (!BuildConfig.VERSION_CHANNEL.isEmpty()) ui->channelLabel->setText(tr("Channel") +": " + BuildConfig.VERSION_CHANNEL); diff --git a/launcher/ui/dialogs/AboutDialog.ui b/launcher/ui/dialogs/AboutDialog.ui index 6323992b..6eaa0c4e 100644 --- a/launcher/ui/dialogs/AboutDialog.ui +++ b/launcher/ui/dialogs/AboutDialog.ui @@ -184,12 +184,28 @@ </widget> </item> <item> - <widget class="QLabel" name="buildNumLabel"> + <widget class="QLabel" name="buildDateLabel"> <property name="cursor"> <cursorShape>IBeamCursor</cursorShape> </property> <property name="text"> - <string>Build Number:</string> + <string>Build Date:</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="textInteractionFlags"> + <set>Qt::TextSelectableByMouse</set> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="commitLabel"> + <property name="cursor"> + <cursorShape>IBeamCursor</cursorShape> + </property> + <property name="text"> + <string>Commit:</string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> |