mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use DispatcherPriority.Render for theme UI updates
Explicitly set DispatcherPriority.Render when invoking RefreshFrameAsync and SetBlurForWindowAsync on the application's dispatcher. This ensures theme-related UI changes are processed with rendering priority, improving responsiveness and visual consistency. Also added System.Windows.Threading import for access to DispatcherPriority.
This commit is contained in:
parent
9943b72839
commit
3db201f4a3
1 changed files with 3 additions and 2 deletions
|
|
@ -16,6 +16,7 @@ using Flow.Launcher.Infrastructure.UserSettings;
|
|||
using Flow.Launcher.Plugin;
|
||||
using Flow.Launcher.Plugin.SharedModels;
|
||||
using Microsoft.Win32;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace Flow.Launcher.Core.Resource
|
||||
{
|
||||
|
|
@ -692,7 +693,7 @@ namespace Flow.Launcher.Core.Resource
|
|||
if (Application.Current == null) return;
|
||||
if (!Application.Current.Dispatcher.CheckAccess())
|
||||
{
|
||||
await Application.Current?.Dispatcher.InvokeAsync(RefreshFrameAsync);
|
||||
await Application.Current?.Dispatcher.InvokeAsync(RefreshFrameAsync, DispatcherPriority.Render);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -725,7 +726,7 @@ namespace Flow.Launcher.Core.Resource
|
|||
if (Application.Current == null) return;
|
||||
if (!Application.Current.Dispatcher.CheckAccess())
|
||||
{
|
||||
await Application.Current?.Dispatcher.InvokeAsync(SetBlurForWindowAsync);
|
||||
await Application.Current?.Dispatcher.InvokeAsync(SetBlurForWindowAsync, DispatcherPriority.Render);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue