Browse Source
fixed carboxyl impl
Signed-off-by: crueter <crueter@eden-emu.dev>
pull/3016/head
crueter
2 months ago
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
31 changed files with
191 additions and
34 deletions
-
src/Eden/Config/GlobalConfigureDialog.qml
-
src/Eden/Config/fields/BaseField.qml
-
src/Eden/Config/fields/ConfigComboBox.qml
-
src/Eden/Config/pages/PageScrollView.qml
-
src/Eden/Config/pages/SettingsList.qml
-
src/Eden/Config/pages/audio/AudioGeneralPage.qml
-
src/Eden/Config/pages/cpu/CpuGeneralPage.qml
-
src/Eden/Config/pages/debug/DebugAdvancedPage.qml
-
src/Eden/Config/pages/debug/DebugCpuPage.qml
-
src/Eden/Config/pages/debug/DebugGeneralPage.qml
-
src/Eden/Config/pages/debug/DebugGraphicsPage.qml
-
src/Eden/Config/pages/general/UiGameListPage.qml
-
src/Eden/Config/pages/general/UiGeneralPage.qml
-
src/Eden/Config/pages/graphics/RendererAdvancedPage.qml
-
src/Eden/Config/pages/graphics/RendererExtensionsPage.qml
-
src/Eden/Config/pages/graphics/RendererPage.qml
-
src/Eden/Config/pages/system/AppletsPage.qml
-
src/Eden/Config/pages/system/FileSystemPage.qml
-
src/Eden/Config/pages/system/SystemCorePage.qml
-
src/Eden/Config/pages/system/SystemGeneralPage.qml
-
src/Eden/Main/GameCarousel.qml
-
src/Eden/Main/GameCarouselCard.qml
-
src/Eden/Main/GameGrid.qml
-
src/Eden/Main/GameGridCard.qml
-
src/Eden/Main/GameList.qml
-
src/Eden/Main/Main.qml
-
src/Eden/Models/SettingsModel.cpp
-
src/Eden/Models/SettingsModel.h
-
src/Eden/Util/Util.qml
-
src/qt_common/config/qt_config.cpp
-
src/qt_common/config/uisettings.h
|
|
|
@ -22,18 +22,19 @@ Dialog { |
|
|
|
title: qsTr("Configuration") |
|
|
|
standardButtons: Dialog.Ok | Dialog.Cancel |
|
|
|
|
|
|
|
Component.onCompleted: configs = Util.searchItem(swipe, "BaseField") |
|
|
|
Component.onCompleted: configs = Util.searchItem(swipe, "PageScrollView") |
|
|
|
onAccepted: { |
|
|
|
console.log("Accepted") |
|
|
|
configs.forEach(config => { |
|
|
|
config.apply() |
|
|
|
console.log(config.setting.label) |
|
|
|
}) |
|
|
|
|
|
|
|
// console.log("Saving") |
|
|
|
QtConfig.save() |
|
|
|
} |
|
|
|
onRejected: { |
|
|
|
console.log("Rejected") |
|
|
|
configs.forEach(config => config.sync()) |
|
|
|
// TODO |
|
|
|
// configs.forEach(config => config.sync()) |
|
|
|
// QtConfig.reload() |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -23,7 +23,7 @@ Item { |
|
|
|
Component.onCompleted: sync() |
|
|
|
|
|
|
|
function apply() { |
|
|
|
console.log("Applying value", value, "to", setting.label) |
|
|
|
// console.log("Applying value", value, "to", setting.label) |
|
|
|
if (setting.value !== value) { |
|
|
|
setting.value = value |
|
|
|
} |
|
|
|
|
|
|
|
@ -6,6 +6,8 @@ import Eden.Constants |
|
|
|
import Eden.Config |
|
|
|
|
|
|
|
BaseField { |
|
|
|
id: field |
|
|
|
|
|
|
|
contentItem: ComboBox { |
|
|
|
id: control |
|
|
|
enabled: enable |
|
|
|
@ -15,6 +17,16 @@ BaseField { |
|
|
|
|
|
|
|
font.pixelSize: 14 |
|
|
|
model: setting.combo |
|
|
|
currentIndex: value |
|
|
|
|
|
|
|
currentIndex: -1 |
|
|
|
|
|
|
|
// currentIndex: value |
|
|
|
Component.onCompleted: { |
|
|
|
currentIndex = setting.value === undefined ? 0 : setting.value |
|
|
|
} |
|
|
|
onCurrentIndexChanged: { |
|
|
|
if (currentIndex !== undefined) |
|
|
|
field.value = currentIndex |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -5,6 +5,8 @@ import QtQuick.Layouts |
|
|
|
ScrollView { |
|
|
|
id: scroll |
|
|
|
|
|
|
|
readonly property string typeName: "PageScrollView" |
|
|
|
|
|
|
|
WheelHandler { |
|
|
|
target: scroll |
|
|
|
onWheel: event => { |
|
|
|
|
|
|
|
@ -5,6 +5,8 @@ import Eden.Config |
|
|
|
import Eden.Interface |
|
|
|
|
|
|
|
ListView { |
|
|
|
id: list |
|
|
|
|
|
|
|
required property int category |
|
|
|
|
|
|
|
property bool inset: false |
|
|
|
@ -12,6 +14,14 @@ ListView { |
|
|
|
property list<string> idInclude: [] |
|
|
|
property list<string> idExclude: [] |
|
|
|
|
|
|
|
function apply() { |
|
|
|
for (var i = 0; i < count; ++i) { |
|
|
|
var itm = itemAtIndex(i) |
|
|
|
if (itm !== null) |
|
|
|
itm.apply() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
clip: true |
|
|
|
boundsBehavior: Flickable.StopAtBounds |
|
|
|
|
|
|
|
|
|
|
|
@ -7,10 +7,16 @@ import Eden.Config |
|
|
|
|
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
|
|
|
|
function apply() { |
|
|
|
audio.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: audio |
|
|
|
category: SettingsCategories.Audio |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -7,10 +7,16 @@ import Eden.Config |
|
|
|
|
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
|
|
|
|
function apply() { |
|
|
|
cpu.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: cpu |
|
|
|
category: SettingsCategories.Cpu |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -8,11 +8,16 @@ import Eden.Config |
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
|
|
|
|
function apply() { |
|
|
|
debug.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
// TODO: filter |
|
|
|
SettingsList { |
|
|
|
id: debug |
|
|
|
category: SettingsCategories.Debugging |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -8,10 +8,15 @@ import Eden.Config |
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
|
|
|
|
function apply() { |
|
|
|
cpu.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: cpu |
|
|
|
category: SettingsCategories.CpuDebug |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -8,6 +8,11 @@ import Eden.Config |
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
|
|
|
|
function apply() { |
|
|
|
debug.apply() |
|
|
|
misc.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
@ -16,11 +21,13 @@ PageScrollView { |
|
|
|
|
|
|
|
// TODO: split |
|
|
|
SettingsList { |
|
|
|
id: debug |
|
|
|
category: SettingsCategories.Debugging |
|
|
|
} |
|
|
|
|
|
|
|
// TODO: wrong category? |
|
|
|
SettingsList { |
|
|
|
id: misc |
|
|
|
category: SettingsCategories.Miscellaneous |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -8,12 +8,15 @@ import Eden.Config |
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
|
|
|
|
function apply() { |
|
|
|
gfx.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
id: gfx |
|
|
|
category: SettingsCategories.DebuggingGraphics |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -8,11 +8,16 @@ import Eden.Config |
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
|
|
|
|
function apply() { |
|
|
|
ui.apply() |
|
|
|
} |
|
|
|
|
|
|
|
// TODO: language, theme |
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: ui |
|
|
|
category: SettingsCategories.UiGameList |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -5,12 +5,28 @@ import QtQuick.Layouts |
|
|
|
import Eden.Interface |
|
|
|
import Eden.Config |
|
|
|
|
|
|
|
import Carboxyl.Base |
|
|
|
|
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
function apply() { |
|
|
|
ui.apply() |
|
|
|
style.apply() |
|
|
|
theme.apply() |
|
|
|
accent.apply() |
|
|
|
|
|
|
|
Palettes.accent = Palettes.accents[accent.contentItem.currentIndex] |
|
|
|
Palettes.theme = Palettes.themes[theme.contentItem.currentIndex] |
|
|
|
|
|
|
|
if (linux.visible) |
|
|
|
linux.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: ui |
|
|
|
category: SettingsCategories.UiGeneral |
|
|
|
} |
|
|
|
|
|
|
|
@ -20,6 +36,7 @@ PageScrollView { |
|
|
|
} |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: linux |
|
|
|
category: SettingsCategories.Linux |
|
|
|
visible: Qt.platform.os === "linux" |
|
|
|
} |
|
|
|
@ -28,8 +45,22 @@ PageScrollView { |
|
|
|
text: qsTr("Theming") |
|
|
|
} |
|
|
|
|
|
|
|
// SettingsList { |
|
|
|
// category: SettingsCategories.UiLayout |
|
|
|
// } |
|
|
|
ConfigComboBox { |
|
|
|
Layout.fillWidth: true |
|
|
|
id: style |
|
|
|
setting: SettingsInterface.setting("carboxyl_style") |
|
|
|
} |
|
|
|
|
|
|
|
ConfigComboBox { |
|
|
|
Layout.fillWidth: true |
|
|
|
id: theme |
|
|
|
setting: SettingsInterface.setting("carboxyl_theme") |
|
|
|
} |
|
|
|
|
|
|
|
ConfigComboBox { |
|
|
|
Layout.fillWidth: true |
|
|
|
id: accent |
|
|
|
setting: SettingsInterface.setting("carboxyl_accent") |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -7,10 +7,16 @@ import Eden.Config |
|
|
|
|
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
|
|
|
|
function apply() { |
|
|
|
gfx.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: gfx |
|
|
|
category: SettingsCategories.RendererAdvanced |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -7,10 +7,15 @@ import Eden.Config |
|
|
|
|
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
function apply() { |
|
|
|
ext.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: ext |
|
|
|
category: SettingsCategories.RendererExtensions |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -7,10 +7,16 @@ import Eden.Config |
|
|
|
|
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
|
|
|
|
function apply() { |
|
|
|
gfx.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: gfx |
|
|
|
category: SettingsCategories.Renderer |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -7,10 +7,15 @@ import Eden.Config |
|
|
|
|
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
function apply() { |
|
|
|
app.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: app |
|
|
|
category: SettingsCategories.LibraryApplet |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -7,10 +7,16 @@ import Eden.Config |
|
|
|
|
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
|
|
|
|
function apply() { |
|
|
|
fs.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: fs |
|
|
|
category: SettingsCategories.DataStorage |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -7,10 +7,16 @@ import Eden.Config |
|
|
|
|
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
|
|
|
|
function apply() { |
|
|
|
core.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: core |
|
|
|
category: SettingsCategories.Core |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -7,14 +7,22 @@ import Eden.Config |
|
|
|
|
|
|
|
PageScrollView { |
|
|
|
id: scroll |
|
|
|
|
|
|
|
function apply() { |
|
|
|
net.apply() |
|
|
|
sys.apply() |
|
|
|
} |
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
width: scroll.width - scroll.effectiveScrollBarWidth |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: net |
|
|
|
category: SettingsCategories.Network |
|
|
|
} |
|
|
|
|
|
|
|
SettingsList { |
|
|
|
id: sys |
|
|
|
category: SettingsCategories.System |
|
|
|
idExclude: ["custom_rtc", "custom_rtc_offset", "current_user"] |
|
|
|
} |
|
|
|
|
|
|
|
@ -51,7 +51,7 @@ ListView { |
|
|
|
|
|
|
|
color: "transparent" |
|
|
|
border { |
|
|
|
color: "deepskyblue" |
|
|
|
color: palette.accent |
|
|
|
width: 4 |
|
|
|
} |
|
|
|
|
|
|
|
@ -69,7 +69,7 @@ ListView { |
|
|
|
font.pixelSize: 22 |
|
|
|
font.family: "Monospace" |
|
|
|
|
|
|
|
color: "lightblue" |
|
|
|
color: palette.accent |
|
|
|
background: "transparent" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -18,7 +18,7 @@ Item { |
|
|
|
color: "transparent" |
|
|
|
border { |
|
|
|
width: 4 |
|
|
|
color: PathView.isCurrentItem ? "deepskyblue" : "transparent" |
|
|
|
color: PathView.isCurrentItem ? palette.accent : "transparent" |
|
|
|
} |
|
|
|
|
|
|
|
Image { |
|
|
|
|
|
|
|
@ -44,7 +44,7 @@ GridView { |
|
|
|
|
|
|
|
radius: 16 |
|
|
|
border { |
|
|
|
color: "deepskyblue" |
|
|
|
color: palette.accent |
|
|
|
width: 4 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -5,6 +5,8 @@ import QtCore |
|
|
|
|
|
|
|
import Eden.Constants |
|
|
|
|
|
|
|
import Carboxyl.Base |
|
|
|
|
|
|
|
Rectangle { |
|
|
|
id: wrapper |
|
|
|
|
|
|
|
@ -73,7 +75,7 @@ Rectangle { |
|
|
|
font.pixelSize: 18 |
|
|
|
font.family: "Monospace" |
|
|
|
|
|
|
|
color: "lightblue" |
|
|
|
color: palette.accent |
|
|
|
background: "transparent" |
|
|
|
|
|
|
|
canMarquee: wrapper.GridView.isCurrentItem |
|
|
|
|
|
|
|
@ -72,24 +72,24 @@ Rectangle { |
|
|
|
margins: 8 |
|
|
|
} |
|
|
|
|
|
|
|
GameGrid { |
|
|
|
setting: root.setting |
|
|
|
// GameGrid { |
|
|
|
// setting: root.setting |
|
|
|
|
|
|
|
id: grid |
|
|
|
// id: grid |
|
|
|
|
|
|
|
anchors.fill: parent |
|
|
|
} |
|
|
|
// GameCarousel { |
|
|
|
// id: carousel |
|
|
|
// anchors.fill: parent |
|
|
|
// } |
|
|
|
GameCarousel { |
|
|
|
id: carousel |
|
|
|
|
|
|
|
// height: 300 |
|
|
|
height: 300 |
|
|
|
|
|
|
|
// anchors { |
|
|
|
// right: view.right |
|
|
|
// left: view.left |
|
|
|
anchors { |
|
|
|
right: view.right |
|
|
|
left: view.left |
|
|
|
|
|
|
|
// verticalCenter: view.verticalCenter |
|
|
|
// } |
|
|
|
// } |
|
|
|
verticalCenter: view.verticalCenter |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -15,6 +15,9 @@ ApplicationWindow { |
|
|
|
|
|
|
|
palette: Palettes.theme |
|
|
|
|
|
|
|
property var theme: SettingsInterface.setting("carboxyl_theme") |
|
|
|
property var accent: SettingsInterface.setting("carboxyl_accent") |
|
|
|
|
|
|
|
GameList { |
|
|
|
anchors { |
|
|
|
top: parent.top |
|
|
|
@ -24,6 +27,11 @@ ApplicationWindow { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Component.onCompleted: { |
|
|
|
Palettes.theme = Palettes.themes[theme.value] |
|
|
|
Palettes.accent = Palettes.accents[accent.value] |
|
|
|
} |
|
|
|
|
|
|
|
/** Dialogs */ |
|
|
|
GlobalConfigureDialog { |
|
|
|
id: globalConfig |
|
|
|
|
|
|
|
@ -72,6 +72,11 @@ void SettingsModel::append(QList<QMLSetting *> settings) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
QList<QMLSetting *> SettingsModel::items() |
|
|
|
{ |
|
|
|
return m_data; |
|
|
|
} |
|
|
|
|
|
|
|
QHash<int, QByteArray> SettingsModel::roleNames() const |
|
|
|
{ |
|
|
|
QHash<int,QByteArray> rez; |
|
|
|
|
|
|
|
@ -32,6 +32,8 @@ public: |
|
|
|
void append(QMLSetting *setting); |
|
|
|
void append(QList<QMLSetting *> settings); |
|
|
|
|
|
|
|
Q_INVOKABLE QList<QMLSetting *> items(); |
|
|
|
|
|
|
|
protected: |
|
|
|
QHash<int, QByteArray> roleNames() const override; |
|
|
|
|
|
|
|
|
|
|
|
@ -3,6 +3,8 @@ pragma Singleton |
|
|
|
import QtQuick |
|
|
|
|
|
|
|
QtObject { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* Recursively search an Item for children matching the specified type. |
|
|
|
* @return A list of found items. |
|
|
|
|
|
|
|
@ -309,7 +309,7 @@ void QtConfig::ReadUIGamelistValues() { |
|
|
|
} |
|
|
|
|
|
|
|
void QtConfig::ReadUILayoutValues() { |
|
|
|
BeginGroup(Settings::TranslateCategory(Settings::Category::UiGameList)); |
|
|
|
BeginGroup(Settings::TranslateCategory(Settings::Category::UiLayout)); |
|
|
|
|
|
|
|
ReadCategory(Settings::Category::UiLayout); |
|
|
|
|
|
|
|
|
|
|
|
@ -158,9 +158,12 @@ struct Values { |
|
|
|
|
|
|
|
#ifdef YUZU_QT_QML |
|
|
|
// TODO: native-like style default |
|
|
|
Setting<Settings::Theme> carboxyl_theme{linkage, Settings::Theme::System, "carboyl_theme", Category::UiLayout}; |
|
|
|
Setting<Settings::Style> carboxyl_style{linkage, Settings::Style::Trioxide, "carboyl_style", Category::UiLayout}; |
|
|
|
Setting<Settings::Accent> carboxyl_accent{linkage, Settings::Accent::System, "carboyl_accent", Category::UiLayout}; |
|
|
|
Setting<Settings::Theme> carboxyl_theme{linkage, Settings::Theme::System , "carboxyl_theme", Category::UiLayout}; |
|
|
|
Setting<Settings::Style> carboxyl_style{linkage, |
|
|
|
Settings::Style::Trioxide, |
|
|
|
"carboxyl_style", |
|
|
|
Category::UiLayout}; |
|
|
|
Setting<Settings::Accent> carboxyl_accent{linkage, Settings::Accent::System , "carboxyl_accent", Category::UiLayout}; |
|
|
|
#endif |
|
|
|
|
|
|
|
// Discord RPC |
|
|
|
|