Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Resources/icon-exit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion launchersettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class LauncherSettings : public QObject {
Q_PROPERTY(bool startOpenLog READ startOpenLog WRITE setStartOpenLog NOTIFY settingsChanged)
Q_PROPERTY(bool disableGameLog READ disableGameLog WRITE setDisableGameLog NOTIFY settingsChanged)
Q_PROPERTY(bool checkForUpdates READ checkForUpdates WRITE setCheckForUpdates NOTIFY settingsChanged)
Q_PROPERTY(bool showExitButton READ showExitButton WRITE setShowExitButton NOTIFY settingsChanged)
Q_PROPERTY(bool showUnverified READ showUnverified WRITE setShowUnverified NOTIFY settingsChanged)
Q_PROPERTY(bool showUnsupported READ showUnsupported WRITE setShowUnsupported NOTIFY settingsChanged)
Q_PROPERTY(bool showBetaVersions READ showBetaVersions WRITE setShowBetaVersions NOTIFY settingsChanged)
Expand All @@ -35,7 +36,7 @@ class LauncherSettings : public QObject {

public:
static bool disableDevMode;

explicit LauncherSettings(QObject *parent = nullptr) : QObject(parent), settings() {}

bool startHideLauncher() const { return settings.value("startHideLauncher", true).toBool(); }
Expand All @@ -50,6 +51,9 @@ class LauncherSettings : public QObject {
bool checkForUpdates() const { return settings.value("checkForUpdates", true).toBool(); }
void setCheckForUpdates(bool value) { settings.setValue("checkForUpdates", value); emit settingsChanged(); }

bool showExitButton() const { return settings.value("showExitButton", false).toBool(); }
void setShowExitButton(bool value) { settings.setValue("showExitButton", value); emit settingsChanged(); }

bool showUnverified() const { return !disableDevMode && settings.value("showUnverified", false).toBool(); }
void setShowUnverified(bool value) { settings.setValue("showUnverified", value); emit settingsChanged(); }

Expand Down
1 change: 1 addition & 0 deletions qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<file>Resources/check.png</file>
<file>Resources/noise.png</file>
<file>Resources/icon-edit.png</file>
<file>Resources/icon-exit.png</file>
<file>Resources/icon-settings.png</file>
<file>Resources/icon-copy.png</file>
<file>Resources/icon-home.png</file>
Expand Down
8 changes: 8 additions & 0 deletions qml/MainNavigation.qml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ RowLayout {
onClicked: updateIndex(4)
checked: currentIndex == 4
}
MSideBarItem {
visible: launcherSettings.showExitButton
text: qsTr("Exit")
iconSource: "qrc:/Resources/icon-exit.png"
showText: useWideLayout
onClicked: Qt.quit()
checked: false
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions qml/SettingsGeneralSection.qml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ ColumnLayout {
onCheckedChanged: launcherSettings.showNotifications = checked
}

MCheckBox {
text: qsTr("Show exit button in navigation bar")
Component.onCompleted: checked = launcherSettings.showExitButton
onCheckedChanged: launcherSettings.showExitButton = checked
}

MCheckBox {
text: qsTr("ChromeOS Mode")
Component.onCompleted: checked = launcherSettings.chromeOSMode
Expand Down