mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
[ColorPicker]Fix picker opaque corners (#33457)
This commit is contained in:
@@ -135,6 +135,14 @@ namespace ColorPicker.Helpers
|
|||||||
Application.Current.MainWindow.Opacity = 0;
|
Application.Current.MainWindow.Opacity = 0;
|
||||||
Application.Current.MainWindow.Visibility = Visibility.Visible;
|
Application.Current.MainWindow.Visibility = Visibility.Visible;
|
||||||
_colorPickerShown = true;
|
_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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user