Skip to content

Commit

Permalink
fix theme apply
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaProductions committed Mar 28, 2024
1 parent 99342b6 commit be2fc7f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Rectify11Installer/Core/Backend/Themes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -545,27 +545,29 @@ private static void ApplyScheme()
{
if (InstallOptions.ThemeLight)
{
Process.Start(Path.Combine(Variables.Windir, "Resources", "Themes", "lightrectified.theme"));
key.SetValue("ApplyR11Theme", Path.Combine(Variables.Windir, "Resources", "Themes", "lightrectified.theme"), RegistryValueKind.String);
RectifyThemeUtil.Utility.ApplyTheme("Rectify11 light theme");
}
else if (InstallOptions.ThemeDark)
{
Process.Start(Path.Combine(Variables.Windir, "Resources", "Themes", "darkrectified.theme"));
key.SetValue("ApplyR11Theme", Path.Combine(Variables.Windir, "Resources", "Themes", "darkrectified.theme"), RegistryValueKind.String);
RectifyThemeUtil.Utility.ApplyTheme("Rectify11 dark theme");
}
else if (InstallOptions.ThemePDark)
{
Process.Start(Path.Combine(Variables.Windir, "Resources", "Themes", "darkpartial.theme"));
key.SetValue("ApplyR11Theme", Path.Combine(Variables.Windir, "Resources", "Themes", "darkpartial.theme"), RegistryValueKind.String);
RectifyThemeUtil.Utility.ApplyTheme("Rectify11 partial dark theme");
}
else
{
Process.Start(Path.Combine(Variables.Windir, "Resources", "Themes", "black.theme"));
key.SetValue("ApplyR11Theme", Path.Combine(Variables.Windir, "Resources", "Themes", "black.theme"), RegistryValueKind.String);
RectifyThemeUtil.Utility.ApplyTheme("Rectify11 Dark theme with Mica");
}


key.SetValue("DeleteJunk", "rmdir /s /q " + Path.Combine(Environment.SpecialFolder.LocalApplicationData.ToString(), "junk"), RegistryValueKind.String);
key.Close();
}
key.SetValue("DeleteJunk", "rmdir /s /q " + Path.Combine(Environment.SpecialFolder.LocalApplicationData.ToString(), "junk"), RegistryValueKind.String);
key.Close();
}
#endregion
}
Expand Down

0 comments on commit be2fc7f

Please sign in to comment.