mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
[Run] Switch to WPF UI theme manager (#30520)
* Switch to WPF UI theme manager * fix * add theme manager * fix * fix * update error icon * moved image initialization * cleanup
This commit is contained in:
committed by
GitHub
parent
e73e73fa6c
commit
ae21b0dc09
@@ -24,6 +24,7 @@ using PowerLauncher.ViewModel;
|
||||
using Wox.Infrastructure.UserSettings;
|
||||
using Wox.Plugin;
|
||||
using Wox.Plugin.Interfaces;
|
||||
using Wpf.Ui.Appearance;
|
||||
using CancellationToken = System.Threading.CancellationToken;
|
||||
using Image = Wox.Infrastructure.Image;
|
||||
using KeyEventArgs = System.Windows.Input.KeyEventArgs;
|
||||
@@ -65,15 +66,7 @@ namespace PowerLauncher
|
||||
WindowBackdropType = Wpf.Ui.Controls.WindowBackdropType.None;
|
||||
}
|
||||
|
||||
// workaround for #30217
|
||||
try
|
||||
{
|
||||
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this, WindowBackdropType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Exception("Exception in SystemThemeWatcher.Watch, issue 30217.", ex, GetType());
|
||||
}
|
||||
SystemThemeWatcher.Watch(this, WindowBackdropType);
|
||||
|
||||
_firstDeleteTimer.Elapsed += CheckForFirstDelete;
|
||||
_firstDeleteTimer.Interval = 1000;
|
||||
@@ -803,11 +796,7 @@ namespace PowerLauncher
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
if (_firstDeleteTimer != null)
|
||||
{
|
||||
_firstDeleteTimer.Dispose();
|
||||
}
|
||||
|
||||
_firstDeleteTimer?.Dispose();
|
||||
_hwndSource?.Dispose();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user