diff --git a/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs b/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs
index b357f0d30..77c6346f2 100644
--- a/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs
+++ b/src/Ryujinx.UI.Common/Configuration/ConfigurationFileFormat.cs
@@ -298,16 +298,6 @@ namespace Ryujinx.UI.Common.Configuration
///
public string LanguageCode { get; set; }
- ///
- /// Enable or disable custom themes in the GUI
- ///
- public bool EnableCustomTheme { get; set; }
-
- ///
- /// Path to custom GUI theme
- ///
- public string CustomThemePath { get; set; }
-
///
/// Chooses the base style // Not Used
///
diff --git a/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs b/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs
index b7ad29051..50b3569a1 100644
--- a/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs
+++ b/src/Ryujinx.UI.Common/Configuration/ConfigurationState.cs
@@ -144,16 +144,6 @@ namespace Ryujinx.UI.Common.Configuration
///
public ReactiveObject LanguageCode { get; private set; }
- ///
- /// Enable or disable custom themes in the GUI
- ///
- public ReactiveObject EnableCustomTheme { get; private set; }
-
- ///
- /// Path to custom GUI theme
- ///
- public ReactiveObject CustomThemePath { get; private set; }
-
///
/// Selects the base style
///
@@ -202,8 +192,6 @@ namespace Ryujinx.UI.Common.Configuration
AutoloadDirs = new ReactiveObject>();
ShownFileTypes = new ShownFileTypeSettings();
WindowStartup = new WindowStartupSettings();
- EnableCustomTheme = new ReactiveObject();
- CustomThemePath = new ReactiveObject();
BaseStyle = new ReactiveObject();
StartFullscreen = new ReactiveObject();
GameListViewMode = new ReactiveObject();
@@ -777,8 +765,6 @@ namespace Ryujinx.UI.Common.Configuration
WindowMaximized = UI.WindowStartup.WindowMaximized,
},
LanguageCode = UI.LanguageCode,
- EnableCustomTheme = UI.EnableCustomTheme,
- CustomThemePath = UI.CustomThemePath,
BaseStyle = UI.BaseStyle,
GameListViewMode = UI.GameListViewMode,
ShowNames = UI.ShowNames,
@@ -811,8 +797,8 @@ namespace Ryujinx.UI.Common.Configuration
Graphics.MaxAnisotropy.Value = -1.0f;
Graphics.AspectRatio.Value = AspectRatio.Fixed16x9;
Graphics.GraphicsBackend.Value = DefaultGraphicsBackend();
- Graphics.PreferredGpu.Value = "";
- Graphics.ShadersDumpPath.Value = "";
+ Graphics.PreferredGpu.Value = string.Empty;
+ Graphics.ShadersDumpPath.Value = string.Empty;
Logger.EnableDebug.Value = false;
Logger.EnableStub.Value = true;
Logger.EnableInfo.Value = true;
@@ -821,7 +807,7 @@ namespace Ryujinx.UI.Common.Configuration
Logger.EnableTrace.Value = false;
Logger.EnableGuest.Value = true;
Logger.EnableFsAccessLog.Value = false;
- Logger.FilteredClasses.Value = Array.Empty();
+ Logger.FilteredClasses.Value = [];
Logger.GraphicsDebugLevel.Value = GraphicsDebugLevel.None;
System.Language.Value = Language.AmericanEnglish;
System.Region.Value = Region.USA;
@@ -868,17 +854,15 @@ namespace Ryujinx.UI.Common.Configuration
UI.GuiColumns.PathColumn.Value = true;
UI.ColumnSort.SortColumnId.Value = 0;
UI.ColumnSort.SortAscending.Value = false;
- UI.GameDirs.Value = new List();
- UI.AutoloadDirs.Value = new List();
+ UI.GameDirs.Value = [];
+ UI.AutoloadDirs.Value = [];
UI.ShownFileTypes.NSP.Value = true;
UI.ShownFileTypes.PFS0.Value = true;
UI.ShownFileTypes.XCI.Value = true;
UI.ShownFileTypes.NCA.Value = true;
UI.ShownFileTypes.NRO.Value = true;
UI.ShownFileTypes.NSO.Value = true;
- UI.EnableCustomTheme.Value = true;
UI.LanguageCode.Value = "en_US";
- UI.CustomThemePath.Value = "";
UI.BaseStyle.Value = "Dark";
UI.GameListViewMode.Value = 0;
UI.ShowNames.Value = true;
@@ -1628,9 +1612,7 @@ namespace Ryujinx.UI.Common.Configuration
UI.ShownFileTypes.NCA.Value = configurationFileFormat.ShownFileTypes.NCA;
UI.ShownFileTypes.NRO.Value = configurationFileFormat.ShownFileTypes.NRO;
UI.ShownFileTypes.NSO.Value = configurationFileFormat.ShownFileTypes.NSO;
- UI.EnableCustomTheme.Value = configurationFileFormat.EnableCustomTheme;
UI.LanguageCode.Value = configurationFileFormat.LanguageCode;
- UI.CustomThemePath.Value = configurationFileFormat.CustomThemePath;
UI.BaseStyle.Value = configurationFileFormat.BaseStyle;
UI.GameListViewMode.Value = configurationFileFormat.GameListViewMode;
UI.ShowNames.Value = configurationFileFormat.ShowNames;
diff --git a/src/Ryujinx/App.axaml.cs b/src/Ryujinx/App.axaml.cs
index 295ac1503..509deb34c 100644
--- a/src/Ryujinx/App.axaml.cs
+++ b/src/Ryujinx/App.axaml.cs
@@ -58,11 +58,9 @@ namespace Ryujinx.Ava
if (Program.PreviewerDetached)
{
- ApplyConfiguredTheme();
+ ApplyConfiguredTheme(ConfigurationState.Instance.UI.BaseStyle);
ConfigurationState.Instance.UI.BaseStyle.Event += ThemeChanged_Event;
- ConfigurationState.Instance.UI.CustomThemePath.Event += ThemeChanged_Event;
- ConfigurationState.Instance.UI.EnableCustomTheme.Event += CustomThemeChanged_Event;
}
}
@@ -88,17 +86,13 @@ namespace Ryujinx.Ava
}
});
}
-
- private void CustomThemeChanged_Event(object _, ReactiveEventArgs __) => ApplyConfiguredTheme();
- private void ThemeChanged_Event(object _, ReactiveEventArgs __) => ApplyConfiguredTheme();
+ private void ThemeChanged_Event(object _, ReactiveEventArgs rArgs) => ApplyConfiguredTheme(rArgs.NewValue);
- public void ApplyConfiguredTheme()
+ public void ApplyConfiguredTheme(string baseStyle)
{
try
{
- string baseStyle = ConfigurationState.Instance.UI.BaseStyle;
-
if (string.IsNullOrWhiteSpace(baseStyle))
{
ConfigurationState.Instance.UI.BaseStyle.Value = "Auto";