mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-24 04:12:32 +08:00
[ColorPicker]Fix picker opaque corners (#33457)
This commit is contained in:
parent
c148b51698
commit
136b239f96
@ -135,6 +135,14 @@ namespace ColorPicker.Helpers
|
||||
Application.Current.MainWindow.Opacity = 0;
|
||||
Application.Current.MainWindow.Visibility = Visibility.Visible;
|
||||
_colorPickerShown = true;
|
||||
|
||||
// HACK: WPF UI theme watcher removes the composition target background color, among other weird stuff.
|
||||
// https://github.com/lepoco/wpfui/blob/303f0aefcd59a142bc681415dc4360a34a15f33d/src/Wpf.Ui/Controls/Window/WindowBackdrop.cs#L280
|
||||
// So we set it back with https://github.com/lepoco/wpfui/blob/303f0aefcd59a142bc681415dc4360a34a15f33d/src/Wpf.Ui/Controls/Window/WindowBackdrop.cs#L191
|
||||
// And also reapply the intended backdrop.
|
||||
// This hack fixes: https://github.com/microsoft/PowerToys/issues/31725
|
||||
Wpf.Ui.Controls.WindowBackdrop.RemoveBackground(Application.Current.MainWindow);
|
||||
Wpf.Ui.Controls.WindowBackdrop.ApplyBackdrop(Application.Current.MainWindow, Wpf.Ui.Controls.WindowBackdropType.None);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user