mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-11-21 17:40:52 +01:00
misc: Remove custom themes in config.
This commit is contained in:
parent
139c195eb7
commit
67ab54e2bb
3 changed files with 8 additions and 42 deletions
|
@ -298,16 +298,6 @@ namespace Ryujinx.UI.Common.Configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string LanguageCode { get; set; }
|
public string LanguageCode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Enable or disable custom themes in the GUI
|
|
||||||
/// </summary>
|
|
||||||
public bool EnableCustomTheme { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Path to custom GUI theme
|
|
||||||
/// </summary>
|
|
||||||
public string CustomThemePath { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Chooses the base style // Not Used
|
/// Chooses the base style // Not Used
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -144,16 +144,6 @@ namespace Ryujinx.UI.Common.Configuration
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ReactiveObject<string> LanguageCode { get; private set; }
|
public ReactiveObject<string> LanguageCode { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Enable or disable custom themes in the GUI
|
|
||||||
/// </summary>
|
|
||||||
public ReactiveObject<bool> EnableCustomTheme { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Path to custom GUI theme
|
|
||||||
/// </summary>
|
|
||||||
public ReactiveObject<string> CustomThemePath { get; private set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Selects the base style
|
/// Selects the base style
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -202,8 +192,6 @@ namespace Ryujinx.UI.Common.Configuration
|
||||||
AutoloadDirs = new ReactiveObject<List<string>>();
|
AutoloadDirs = new ReactiveObject<List<string>>();
|
||||||
ShownFileTypes = new ShownFileTypeSettings();
|
ShownFileTypes = new ShownFileTypeSettings();
|
||||||
WindowStartup = new WindowStartupSettings();
|
WindowStartup = new WindowStartupSettings();
|
||||||
EnableCustomTheme = new ReactiveObject<bool>();
|
|
||||||
CustomThemePath = new ReactiveObject<string>();
|
|
||||||
BaseStyle = new ReactiveObject<string>();
|
BaseStyle = new ReactiveObject<string>();
|
||||||
StartFullscreen = new ReactiveObject<bool>();
|
StartFullscreen = new ReactiveObject<bool>();
|
||||||
GameListViewMode = new ReactiveObject<int>();
|
GameListViewMode = new ReactiveObject<int>();
|
||||||
|
@ -777,8 +765,6 @@ namespace Ryujinx.UI.Common.Configuration
|
||||||
WindowMaximized = UI.WindowStartup.WindowMaximized,
|
WindowMaximized = UI.WindowStartup.WindowMaximized,
|
||||||
},
|
},
|
||||||
LanguageCode = UI.LanguageCode,
|
LanguageCode = UI.LanguageCode,
|
||||||
EnableCustomTheme = UI.EnableCustomTheme,
|
|
||||||
CustomThemePath = UI.CustomThemePath,
|
|
||||||
BaseStyle = UI.BaseStyle,
|
BaseStyle = UI.BaseStyle,
|
||||||
GameListViewMode = UI.GameListViewMode,
|
GameListViewMode = UI.GameListViewMode,
|
||||||
ShowNames = UI.ShowNames,
|
ShowNames = UI.ShowNames,
|
||||||
|
@ -811,8 +797,8 @@ namespace Ryujinx.UI.Common.Configuration
|
||||||
Graphics.MaxAnisotropy.Value = -1.0f;
|
Graphics.MaxAnisotropy.Value = -1.0f;
|
||||||
Graphics.AspectRatio.Value = AspectRatio.Fixed16x9;
|
Graphics.AspectRatio.Value = AspectRatio.Fixed16x9;
|
||||||
Graphics.GraphicsBackend.Value = DefaultGraphicsBackend();
|
Graphics.GraphicsBackend.Value = DefaultGraphicsBackend();
|
||||||
Graphics.PreferredGpu.Value = "";
|
Graphics.PreferredGpu.Value = string.Empty;
|
||||||
Graphics.ShadersDumpPath.Value = "";
|
Graphics.ShadersDumpPath.Value = string.Empty;
|
||||||
Logger.EnableDebug.Value = false;
|
Logger.EnableDebug.Value = false;
|
||||||
Logger.EnableStub.Value = true;
|
Logger.EnableStub.Value = true;
|
||||||
Logger.EnableInfo.Value = true;
|
Logger.EnableInfo.Value = true;
|
||||||
|
@ -821,7 +807,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||||
Logger.EnableTrace.Value = false;
|
Logger.EnableTrace.Value = false;
|
||||||
Logger.EnableGuest.Value = true;
|
Logger.EnableGuest.Value = true;
|
||||||
Logger.EnableFsAccessLog.Value = false;
|
Logger.EnableFsAccessLog.Value = false;
|
||||||
Logger.FilteredClasses.Value = Array.Empty<LogClass>();
|
Logger.FilteredClasses.Value = [];
|
||||||
Logger.GraphicsDebugLevel.Value = GraphicsDebugLevel.None;
|
Logger.GraphicsDebugLevel.Value = GraphicsDebugLevel.None;
|
||||||
System.Language.Value = Language.AmericanEnglish;
|
System.Language.Value = Language.AmericanEnglish;
|
||||||
System.Region.Value = Region.USA;
|
System.Region.Value = Region.USA;
|
||||||
|
@ -868,17 +854,15 @@ namespace Ryujinx.UI.Common.Configuration
|
||||||
UI.GuiColumns.PathColumn.Value = true;
|
UI.GuiColumns.PathColumn.Value = true;
|
||||||
UI.ColumnSort.SortColumnId.Value = 0;
|
UI.ColumnSort.SortColumnId.Value = 0;
|
||||||
UI.ColumnSort.SortAscending.Value = false;
|
UI.ColumnSort.SortAscending.Value = false;
|
||||||
UI.GameDirs.Value = new List<string>();
|
UI.GameDirs.Value = [];
|
||||||
UI.AutoloadDirs.Value = new List<string>();
|
UI.AutoloadDirs.Value = [];
|
||||||
UI.ShownFileTypes.NSP.Value = true;
|
UI.ShownFileTypes.NSP.Value = true;
|
||||||
UI.ShownFileTypes.PFS0.Value = true;
|
UI.ShownFileTypes.PFS0.Value = true;
|
||||||
UI.ShownFileTypes.XCI.Value = true;
|
UI.ShownFileTypes.XCI.Value = true;
|
||||||
UI.ShownFileTypes.NCA.Value = true;
|
UI.ShownFileTypes.NCA.Value = true;
|
||||||
UI.ShownFileTypes.NRO.Value = true;
|
UI.ShownFileTypes.NRO.Value = true;
|
||||||
UI.ShownFileTypes.NSO.Value = true;
|
UI.ShownFileTypes.NSO.Value = true;
|
||||||
UI.EnableCustomTheme.Value = true;
|
|
||||||
UI.LanguageCode.Value = "en_US";
|
UI.LanguageCode.Value = "en_US";
|
||||||
UI.CustomThemePath.Value = "";
|
|
||||||
UI.BaseStyle.Value = "Dark";
|
UI.BaseStyle.Value = "Dark";
|
||||||
UI.GameListViewMode.Value = 0;
|
UI.GameListViewMode.Value = 0;
|
||||||
UI.ShowNames.Value = true;
|
UI.ShowNames.Value = true;
|
||||||
|
@ -1628,9 +1612,7 @@ namespace Ryujinx.UI.Common.Configuration
|
||||||
UI.ShownFileTypes.NCA.Value = configurationFileFormat.ShownFileTypes.NCA;
|
UI.ShownFileTypes.NCA.Value = configurationFileFormat.ShownFileTypes.NCA;
|
||||||
UI.ShownFileTypes.NRO.Value = configurationFileFormat.ShownFileTypes.NRO;
|
UI.ShownFileTypes.NRO.Value = configurationFileFormat.ShownFileTypes.NRO;
|
||||||
UI.ShownFileTypes.NSO.Value = configurationFileFormat.ShownFileTypes.NSO;
|
UI.ShownFileTypes.NSO.Value = configurationFileFormat.ShownFileTypes.NSO;
|
||||||
UI.EnableCustomTheme.Value = configurationFileFormat.EnableCustomTheme;
|
|
||||||
UI.LanguageCode.Value = configurationFileFormat.LanguageCode;
|
UI.LanguageCode.Value = configurationFileFormat.LanguageCode;
|
||||||
UI.CustomThemePath.Value = configurationFileFormat.CustomThemePath;
|
|
||||||
UI.BaseStyle.Value = configurationFileFormat.BaseStyle;
|
UI.BaseStyle.Value = configurationFileFormat.BaseStyle;
|
||||||
UI.GameListViewMode.Value = configurationFileFormat.GameListViewMode;
|
UI.GameListViewMode.Value = configurationFileFormat.GameListViewMode;
|
||||||
UI.ShowNames.Value = configurationFileFormat.ShowNames;
|
UI.ShowNames.Value = configurationFileFormat.ShowNames;
|
||||||
|
|
|
@ -58,11 +58,9 @@ namespace Ryujinx.Ava
|
||||||
|
|
||||||
if (Program.PreviewerDetached)
|
if (Program.PreviewerDetached)
|
||||||
{
|
{
|
||||||
ApplyConfiguredTheme();
|
ApplyConfiguredTheme(ConfigurationState.Instance.UI.BaseStyle);
|
||||||
|
|
||||||
ConfigurationState.Instance.UI.BaseStyle.Event += ThemeChanged_Event;
|
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<bool> __) => ApplyConfiguredTheme();
|
|
||||||
|
|
||||||
private void ThemeChanged_Event(object _, ReactiveEventArgs<string> __) => ApplyConfiguredTheme();
|
private void ThemeChanged_Event(object _, ReactiveEventArgs<string> rArgs) => ApplyConfiguredTheme(rArgs.NewValue);
|
||||||
|
|
||||||
public void ApplyConfiguredTheme()
|
public void ApplyConfiguredTheme(string baseStyle)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string baseStyle = ConfigurationState.Instance.UI.BaseStyle;
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(baseStyle))
|
if (string.IsNullOrWhiteSpace(baseStyle))
|
||||||
{
|
{
|
||||||
ConfigurationState.Instance.UI.BaseStyle.Value = "Auto";
|
ConfigurationState.Instance.UI.BaseStyle.Value = "Auto";
|
||||||
|
|
Loading…
Reference in a new issue