From be2fc7fb10d4784147e418a49e53aff56aa1fab9 Mon Sep 17 00:00:00 2001 From: Misha <106913236+MishaProductions@users.noreply.github.com> Date: Thu, 28 Mar 2024 17:47:15 -0400 Subject: [PATCH] fix theme apply --- Rectify11Installer/Core/Backend/Themes.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Rectify11Installer/Core/Backend/Themes.cs b/Rectify11Installer/Core/Backend/Themes.cs index 4cbdf2a17..89ba2289e 100644 --- a/Rectify11Installer/Core/Backend/Themes.cs +++ b/Rectify11Installer/Core/Backend/Themes.cs @@ -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 }