diff --git a/app/backend/systemproperties.cpp b/app/backend/systemproperties.cpp index a780b529..a220a50d 100644 --- a/app/backend/systemproperties.cpp +++ b/app/backend/systemproperties.cpp @@ -8,6 +8,7 @@ SystemProperties::SystemProperties() { + versionString = QString(VERSION_STR); hasWindowManager = WMUtils::isRunningWindowManager(); isRunningWayland = WMUtils::isRunningWayland(); isRunningXWayland = isRunningWayland && QGuiApplication::platformName() == "xcb"; diff --git a/app/backend/systemproperties.h b/app/backend/systemproperties.h index 02cf3c58..0a8b1a81 100644 --- a/app/backend/systemproperties.h +++ b/app/backend/systemproperties.h @@ -21,6 +21,7 @@ public: Q_PROPERTY(QString unmappedGamepads MEMBER unmappedGamepads NOTIFY unmappedGamepadsChanged) Q_PROPERTY(int maximumStreamingFrameRate MEMBER maximumStreamingFrameRate CONSTANT) Q_PROPERTY(QSize maximumResolution MEMBER maximumResolution CONSTANT) + Q_PROPERTY(QString versionString MEMBER versionString CONSTANT) Q_INVOKABLE QRect getDesktopResolution(int displayIndex); Q_INVOKABLE QRect getNativeResolution(int displayIndex); @@ -44,5 +45,6 @@ private: QSize maximumResolution; QList monitorDesktopResolutions; QList monitorNativeResolutions; + QString versionString; }; diff --git a/app/gui/main.qml b/app/gui/main.qml index e2555caf..b6874d6b 100644 --- a/app/gui/main.qml +++ b/app/gui/main.qml @@ -204,6 +204,15 @@ ApplicationWindow { Layout.fillWidth: true } + Label { + id: versionLabel + visible: stackView.currentItem.objectName === "Settings" + text: "Version " + SystemProperties.versionString + font.pointSize: titleLabel.font.pointSize + horizontalAlignment: Qt.AlignRight + verticalAlignment: Qt.AlignVCenter + } + NavigableToolButton { id: addPcButton visible: stackView.currentItem.objectName === "Computers"