Disable transparency in Win11

This commit is contained in:
Paddy Xu
2021-09-18 19:07:17 +02:00
parent eaa918079c
commit fe6dae67ce
2 changed files with 3 additions and 1 deletions

View File

@@ -38,7 +38,8 @@ namespace QuickLook
public static readonly string AppPath = Path.GetDirectoryName(AppFullPath); public static readonly string AppPath = Path.GetDirectoryName(AppFullPath);
public static readonly bool Is64Bit = Environment.Is64BitProcess; public static readonly bool Is64Bit = Environment.Is64BitProcess;
public static readonly bool IsUWP = ProcessHelper.IsRunningAsUWP(); public static readonly bool IsUWP = ProcessHelper.IsRunningAsUWP();
public static readonly bool IsWin10 = Environment.OSVersion.Version >= new Version(10, 0); public static readonly bool IsWin11 = Environment.OSVersion.Version >= new Version(10, 0, 21996);
public static readonly bool IsWin10 = !IsWin11 && Environment.OSVersion.Version >= new Version(10, 0);
public static readonly bool IsGPUInBlacklist = SystemHelper.IsGPUInBlacklist(); public static readonly bool IsGPUInBlacklist = SystemHelper.IsGPUInBlacklist();
public static readonly bool IsPortable = SettingHelper.IsPortableVersion(); public static readonly bool IsPortable = SettingHelper.IsPortableVersion();

View File

@@ -105,6 +105,7 @@ namespace QuickLook
if (SettingHelper.Get("UseTransparency", true) if (SettingHelper.Get("UseTransparency", true)
&& SystemParameters.IsGlassEnabled && SystemParameters.IsGlassEnabled
&& App.IsWin10 && App.IsWin10
&& !App.IsWin11
&& !App.IsGPUInBlacklist && !App.IsGPUInBlacklist
) )
WindowHelper.EnableBlur(this); WindowHelper.EnableBlur(this);