mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +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
@@ -5,7 +5,6 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Windows;
|
||||
using ManagedCommon;
|
||||
using Wpf.Ui.Controls;
|
||||
using Point = PowerAccent.Core.Point;
|
||||
using Size = PowerAccent.Core.Size;
|
||||
@@ -40,15 +39,7 @@ public partial class Selector : FluentWindow, IDisposable, INotifyPropertyChange
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// workaround for #30177
|
||||
try
|
||||
{
|
||||
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError($"Exception in SystemThemeWatcher.Watch, issue 30177. {ex.Message}");
|
||||
}
|
||||
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this);
|
||||
|
||||
Application.Current.MainWindow.ShowActivated = false;
|
||||
Application.Current.MainWindow.Topmost = true;
|
||||
|
||||
Reference in New Issue
Block a user