mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-01-10 12:49:13 +00:00
Fix themeing
This commit is contained in:
parent
474a557e01
commit
5ec8af597e
1 changed files with 10 additions and 11 deletions
|
@ -38,18 +38,17 @@ namespace Ryujinx.Ava
|
||||||
|
|
||||||
base.OnFrameworkInitializationCompleted();
|
base.OnFrameworkInitializationCompleted();
|
||||||
|
|
||||||
if (Program.PreviewerDetached)
|
|
||||||
{
|
|
||||||
ApplyConfiguredTheme();
|
|
||||||
|
|
||||||
ConfigurationState.Instance.UI.BaseStyle.Event += ThemeChanged_Event;
|
if (!Program.PreviewerDetached)
|
||||||
ConfigurationState.Instance.UI.CustomThemePath.Event += ThemeChanged_Event;
|
|
||||||
ConfigurationState.Instance.UI.EnableCustomTheme.Event += CustomThemeChanged_Event;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
ConfigurationState.Initialize();
|
ConfigurationState.Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ApplyConfiguredTheme();
|
||||||
|
|
||||||
|
ConfigurationState.Instance.Ui.BaseStyle.Event += ThemeChanged_Event;
|
||||||
|
ConfigurationState.Instance.Ui.CustomThemePath.Event += ThemeChanged_Event;
|
||||||
|
ConfigurationState.Instance.Ui.EnableCustomTheme.Event += CustomThemeChanged_Event;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CustomThemeChanged_Event(object sender, ReactiveEventArgs<bool> e)
|
private void CustomThemeChanged_Event(object sender, ReactiveEventArgs<bool> e)
|
||||||
|
@ -92,13 +91,13 @@ namespace Ryujinx.Ava
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string baseStyle = ConfigurationState.Instance.UI.BaseStyle;
|
string baseStyle = ConfigurationState.Instance.Ui.BaseStyle;
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(baseStyle))
|
if (string.IsNullOrWhiteSpace(baseStyle))
|
||||||
{
|
{
|
||||||
ConfigurationState.Instance.UI.BaseStyle.Value = "Dark";
|
ConfigurationState.Instance.Ui.BaseStyle.Value = "Dark";
|
||||||
|
|
||||||
baseStyle = ConfigurationState.Instance.UI.BaseStyle;
|
baseStyle = ConfigurationState.Instance.Ui.BaseStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
RequestedThemeVariant = baseStyle switch
|
RequestedThemeVariant = baseStyle switch
|
||||||
|
|
Loading…
Reference in a new issue