1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-07-15 05:27:44 +00:00

Disable Linux-only options that aren't relevant on Windows

This commit is contained in:
Joshua Goins 2024-04-26 15:54:20 -04:00
parent b67927f5c4
commit 2e50e89793
4 changed files with 17 additions and 0 deletions

View file

@ -62,6 +62,7 @@ class LauncherCore : public QObject
Q_PROPERTY(bool loadingFinished READ isLoadingFinished NOTIFY loadingFinished)
Q_PROPERTY(bool isSteam READ isSteam CONSTANT)
Q_PROPERTY(bool isSteamDeck READ isSteamDeck CONSTANT)
Q_PROPERTY(bool isWindows READ isWindows CONSTANT)
Q_PROPERTY(LauncherSettings *settings READ settings CONSTANT)
Q_PROPERTY(ProfileManager *profileManager READ profileManager CONSTANT)
Q_PROPERTY(AccountManager *accountManager READ accountManager CONSTANT)
@ -110,6 +111,7 @@ public:
[[nodiscard]] bool isLoadingFinished() const;
[[nodiscard]] bool isSteam() const;
[[nodiscard]] bool isSteamDeck() const;
[[nodiscard]] bool isWindows() const;
[[nodiscard]] Q_INVOKABLE bool isPatching() const;
[[nodiscard]] QNetworkAccessManager *mgr();

View file

@ -302,6 +302,15 @@ bool LauncherCore::isSteamDeck() const
}
}
bool LauncherCore::isWindows() const
{
#if defined(Q_OS_WIN)
return true;
#else
return false;
#endif
}
bool LauncherCore::isPatching() const
{
return m_isPatching;

View file

@ -90,6 +90,8 @@ FormCard.FormCardPage {
}
FormCard.FormCard {
visible: !LauncherCore.isWindows
Layout.fillWidth: true
FormCard.FormComboBoxDelegate {
@ -139,9 +141,12 @@ FormCard.FormCardPage {
FormCard.FormHeader {
title: i18n("Tools")
visible: !LauncherCore.isWindows
}
FormCard.FormCard {
visible: !LauncherCore.isWindows
Layout.fillWidth: true
FormCard.FormCheckDelegate {

View file

@ -51,6 +51,7 @@ KirigamiSettings.CategorizedSettings {
text: i18n("Compatibility Tool")
icon.name: "system-run"
page: Qt.resolvedUrl("/qt/qml/zone/xiv/astra/ui/Settings/CompatibilityToolSetup.qml")
visible: !LauncherCore.isWindows
},
KirigamiSettings.SettingAction {
actionName: "devtool"