Skip to content

Commit e7df948

Browse files
committed
Fix partial color palette loading
1 parent 7a0b109 commit e7df948

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

CollapseLauncher/Classes/Extension/UIElementExtensions.ThemeExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static void ChangeAccentColor(this FrameworkElement element, Color accent
3535
element.ReloadPageTheme();
3636
}
3737

38-
private static void ReloadPageTheme(this FrameworkElement page)
38+
internal static void ReloadPageTheme(this FrameworkElement page)
3939
{
4040
ElementTheme theme = InnerLauncherConfig.CurrentAppTheme switch
4141
{

CollapseLauncher/Classes/RegionManagement/RegionManagement.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,11 @@ private async Task DownloadNonPluginBackgroundImage(string backgroun
212212
if (isDownloaded)
213213
{
214214
BackgroundImgChanger.ChangeBackground(imgFileInfo.FullName,
215-
() => IsFirstStartup = false,
215+
() =>
216+
{
217+
IsFirstStartup = false;
218+
this.ReloadPageTheme();
219+
},
216220
false,
217221
false,
218222
true);
@@ -245,7 +249,11 @@ private async Task DownloadNonPluginBackgroundImage(string backgroun
245249
_ => BackgroundMediaUtility.GetDefaultRegionBackgroundPath()
246250
};
247251
BackgroundImgChanger.ChangeBackground(tempImage,
248-
() => IsFirstStartup = false,
252+
() =>
253+
{
254+
IsFirstStartup = false;
255+
this.ReloadPageTheme();
256+
},
249257
false,
250258
false,
251259
true);
@@ -256,7 +264,11 @@ private async Task DownloadNonPluginBackgroundImage(string backgroun
256264
token))
257265
{
258266
BackgroundImgChanger.ChangeBackground(imgFileInfo.FullName,
259-
() => IsFirstStartup = false,
267+
() =>
268+
{
269+
IsFirstStartup = false;
270+
this.ReloadPageTheme();
271+
},
260272
false,
261273
true,
262274
true);

CollapseLauncher/XAMLs/MainApp/MainPage.Background.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using CollapseLauncher.Extension;
12
using CollapseLauncher.Helper.Background;
23
using CollapseLauncher.Helper.Image;
34
using CollapseLauncher.Helper.Metadata;
@@ -221,7 +222,11 @@ internal async Task ChangeBackgroundImageAsRegionAsync(bool ShowLoadingMsg = fal
221222

222223
// If the custom per region is enabled, then execute below
223224
BackgroundImgChanger.ChangeBackground(gameLauncherApi.GameBackgroundImgLocal,
224-
() => IsFirstStartup = false,
225+
() =>
226+
{
227+
IsFirstStartup = false;
228+
this.ReloadPageTheme();
229+
},
225230
IsCustomBG || isUseCustomPerRegionBg,
226231
true,
227232
true);

0 commit comments

Comments
 (0)