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();
|
InitSoundEffects();
|
||||||
DataObject.AddPastingHandler(QueryTextBox, QueryTextBox_OnPaste);
|
DataObject.AddPastingHandler(QueryTextBox, QueryTextBox_OnPaste);
|
||||||
|
ModernWpf.ThemeManager.Current.ActualApplicationThemeChanged += ThemeManager_ActualApplicationThemeChanged;
|
||||||
SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
|
SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -99,6 +99,11 @@ namespace Flow.Launcher
|
||||||
|
|
||||||
#pragma warning disable VSTHRD100 // Avoid async void methods
|
#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)
|
private void OnSourceInitialized(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var handle = Win32Helper.GetWindowHandle(this, true);
|
var handle = Win32Helper.GetWindowHandle(this, true);
|
||||||
|
|
@ -1251,6 +1256,7 @@ namespace Flow.Launcher
|
||||||
_notifyIcon?.Dispose();
|
_notifyIcon?.Dispose();
|
||||||
animationSoundWMP?.Close();
|
animationSoundWMP?.Close();
|
||||||
animationSoundWPF?.Dispose();
|
animationSoundWPF?.Dispose();
|
||||||
|
ModernWpf.ThemeManager.Current.ActualApplicationThemeChanged -= ThemeManager_ActualApplicationThemeChanged;
|
||||||
SystemEvents.PowerModeChanged -= SystemEvents_PowerModeChanged;
|
SystemEvents.PowerModeChanged -= SystemEvents_PowerModeChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue