mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-29 07:47:11 +02: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
|
@ -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<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
|
||||
{
|
||||
string baseStyle = ConfigurationState.Instance.UI.BaseStyle;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(baseStyle))
|
||||
{
|
||||
ConfigurationState.Instance.UI.BaseStyle.Value = "Auto";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue