mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #3543 from onesounds/250514-FixColorSchemeChanging
Fix system ColorScheme update handling
This commit is contained in:
commit
a75553fbcf
1 changed files with 7 additions and 1 deletions
|
|
@ -89,7 +89,7 @@ namespace Flow.Launcher
|
|||
|
||||
InitSoundEffects();
|
||||
DataObject.AddPastingHandler(QueryTextBox, QueryTextBox_OnPaste);
|
||||
|
||||
ModernWpf.ThemeManager.Current.ActualApplicationThemeChanged += ThemeManager_ActualApplicationThemeChanged;
|
||||
SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
|
||||
}
|
||||
|
||||
|
|
@ -99,6 +99,11 @@ namespace Flow.Launcher
|
|||
|
||||
#pragma warning disable VSTHRD100 // Avoid async void methods
|
||||
|
||||
private void ThemeManager_ActualApplicationThemeChanged(ModernWpf.ThemeManager sender, object args)
|
||||
{
|
||||
_theme.RefreshFrameAsync();
|
||||
}
|
||||
|
||||
private void OnSourceInitialized(object sender, EventArgs e)
|
||||
{
|
||||
var handle = Win32Helper.GetWindowHandle(this, true);
|
||||
|
|
@ -1251,6 +1256,7 @@ namespace Flow.Launcher
|
|||
_notifyIcon?.Dispose();
|
||||
animationSoundWMP?.Close();
|
||||
animationSoundWPF?.Dispose();
|
||||
ModernWpf.ThemeManager.Current.ActualApplicationThemeChanged -= ThemeManager_ActualApplicationThemeChanged;
|
||||
SystemEvents.PowerModeChanged -= SystemEvents_PowerModeChanged;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue