mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 19:26:39 +02:00
Hardcoded supported accents version 8 (Windows 8 is 6.2, Windows 7 is 6.1). (#817)
Added check before applying blur.
This commit is contained in:
committed by
bao-qian
parent
f45ca180e9
commit
8f073c5b6f
@@ -15,6 +15,7 @@ namespace Wox.Core.Resource
|
||||
public class Theme : Resource
|
||||
{
|
||||
private static List<string> themeDirectories = new List<string>();
|
||||
private static Version supportedAccentsVersion = new Version(6, 2);
|
||||
public Settings Settings { get; set; }
|
||||
|
||||
public Theme()
|
||||
@@ -59,7 +60,7 @@ namespace Wox.Core.Resource
|
||||
|
||||
// Exception of FindResource can't be cathed if global exception handle is set
|
||||
var isBlur = Application.Current.TryFindResource("ThemeBlurEnabled");
|
||||
if (isBlur is bool)
|
||||
if (isBlur is bool && Environment.OSVersion.Version >= supportedAccentsVersion)
|
||||
{
|
||||
SetBlurForWindow(Application.Current.MainWindow, (bool)isBlur);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user