Add version number to launcher (closes #2365)

This commit is contained in:
Alexander Bock
2023-06-13 19:16:09 +02:00
parent 69b00898d9
commit 7575be32c0
2 changed files with 17 additions and 0 deletions

View File

@@ -30,6 +30,11 @@ LauncherWindow QLabel#clear {
background-color: rgba(0, 0, 0, 0%);
}
LauncherWindow QLabel#version-info {
font-size: 10pt;
color: #dfdfdf;
}
LauncherWindow QComboBox#config {
background: rgb(96, 96, 96);
border: 1px solid rgb(128, 128, 128);

View File

@@ -82,6 +82,9 @@ namespace {
constexpr QRect StartButton(
LeftRuler, TopRuler + 400, ItemWidth, ItemHeight
);
constexpr QRect VersionString(
5, ScreenHeight - SmallItemHeight, ItemWidth, SmallItemHeight
);
} // geometry
std::optional<Profile> loadProfileFromFile(QWidget* parent, std::string filename) {
@@ -364,6 +367,15 @@ QWidget* LauncherWindow::createCentralWidget() {
_editWindowButton->setGeometry(geometry::EditWindowButton);
_editWindowButton->setCursor(Qt::PointingHandCursor);
QLabel* versionLabel = new QLabel(centralWidget);
versionLabel->setVisible(true);
versionLabel->setText(
QString::fromStdString(std::string(openspace::OPENSPACE_VERSION_STRING_FULL))
);
versionLabel->setObjectName("version-info");
versionLabel->setGeometry(geometry::VersionString);
return centralWidget;
}