Browse Source
[config] warn user on reload
Signed-off-by: crueter <crueter@eden-emu.dev>
pull/3016/head
crueter
2 weeks ago
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
4 changed files with
18 additions and
22 deletions
-
src/Eden/Config/GlobalConfigureDialog.qml
-
src/Eden/Config/pages/SettingsList.qml
-
src/Eden/Config/pages/general/UiGeneralPage.qml
-
src/Eden/Interface/SettingsInterface.h
|
|
|
@ -1,6 +1,5 @@ |
|
|
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project |
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later |
|
|
|
|
|
|
|
import QtQuick |
|
|
|
import QtQuick.Controls |
|
|
|
import QtQuick.Layouts |
|
|
|
@ -21,9 +20,7 @@ NativeDialog { |
|
|
|
title: qsTr("Eden Configuration") |
|
|
|
standardButtons: Dialog.Ok | Dialog.Apply | Dialog.Cancel |
|
|
|
|
|
|
|
Component.onCompleted: { |
|
|
|
configs = Util.searchItem(swipe, "PageScrollView") |
|
|
|
} |
|
|
|
Component.onCompleted: configs = Util.searchItem(swipe, "PageScrollView") |
|
|
|
|
|
|
|
function applyConfigs() { |
|
|
|
configs.forEach(config => { |
|
|
|
@ -33,21 +30,29 @@ NativeDialog { |
|
|
|
QtConfig.save() |
|
|
|
} |
|
|
|
|
|
|
|
MessageDialog { |
|
|
|
id: warn |
|
|
|
text: qsTr("To apply the new style, Eden will now close and re-open.") |
|
|
|
icon: CarboxylEnums.Warning |
|
|
|
title: qsTr("Reloading") |
|
|
|
standardButtons: DialogButtonBox.Ok |
|
|
|
|
|
|
|
onVisibleChanged: if (!visible) |
|
|
|
EdenApplication.reload() |
|
|
|
} |
|
|
|
|
|
|
|
onAccepted: { |
|
|
|
applyConfigs() |
|
|
|
|
|
|
|
// TODO(crueter): Configurable game icon size for carousel |
|
|
|
if (EdenApplication.shouldReload) { |
|
|
|
EdenApplication.shouldReload = false |
|
|
|
|
|
|
|
// TODO(crueter): Warn the user. |
|
|
|
// TODO(crueter): Configurable game icon size for carousel |
|
|
|
EdenApplication.reload() |
|
|
|
warn.show() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
onApplied: { |
|
|
|
applyConfigs() |
|
|
|
} |
|
|
|
onApplied: applyConfigs() |
|
|
|
|
|
|
|
onRejected: { |
|
|
|
|
|
|
|
|
|
|
|
@ -1,6 +1,5 @@ |
|
|
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project |
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later |
|
|
|
|
|
|
|
import QtQuick |
|
|
|
import QtQuick.Layouts |
|
|
|
|
|
|
|
@ -36,5 +35,7 @@ ListView { |
|
|
|
Layout.leftMargin: 0 |
|
|
|
spacing: 5 |
|
|
|
|
|
|
|
// TODO: Many styles can get away with 0 or even negative spacing |
|
|
|
// Maybe make a "touch-friendly" setting? |
|
|
|
model: SettingsInterface.category(category, idInclude, idExclude) |
|
|
|
} |
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project |
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later |
|
|
|
|
|
|
|
import QtQuick |
|
|
|
import QtQuick.Controls |
|
|
|
import QtQuick.Layouts |
|
|
|
@ -24,9 +24,6 @@ PageScrollView { |
|
|
|
|
|
|
|
Clover.accent = Clover.accents[accent.contentItem.currentIndex] |
|
|
|
Clover.theme = Clover.themes[theme.contentItem.currentIndex] |
|
|
|
|
|
|
|
if (linux.visible) |
|
|
|
linux.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
@ -42,12 +39,6 @@ PageScrollView { |
|
|
|
visible: Qt.platform.os === "linux" |
|
|
|
} |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: linux |
|
|
|
category: SettingsCategories.Linux |
|
|
|
visible: Qt.platform.os === "linux" |
|
|
|
} |
|
|
|
|
|
|
|
SectionHeader { |
|
|
|
text: qsTr("Theming") |
|
|
|
} |
|
|
|
|
|
|
|
@ -47,7 +47,6 @@ enum class Category { |
|
|
|
Multiplayer = u32(Settings::Category::Multiplayer), |
|
|
|
Services = u32(Settings::Category::Services), |
|
|
|
Paths = u32(Settings::Category::Paths), |
|
|
|
Linux = u32(Settings::Category::Linux), |
|
|
|
LibraryApplet = u32(Settings::Category::LibraryApplet), |
|
|
|
MaxEnum = u32(Settings::Category::MaxEnum), |
|
|
|
}; |
|
|
|
|