Skip to content

Commit

Permalink
Disable transparency in Win11
Browse files Browse the repository at this point in the history
  • Loading branch information
xupefei committed Sep 18, 2021
1 parent eaa9180 commit fe6dae6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion QuickLook/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public partial class App : Application
public static readonly string AppPath = Path.GetDirectoryName(AppFullPath);
public static readonly bool Is64Bit = Environment.Is64BitProcess;
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 IsPortable = SettingHelper.IsPortableVersion();

Expand Down
1 change: 1 addition & 0 deletions QuickLook/ViewerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public override void OnApplyTemplate()
if (SettingHelper.Get("UseTransparency", true)
&& SystemParameters.IsGlassEnabled
&& App.IsWin10
&& !App.IsWin11
&& !App.IsGPUInBlacklist
)
WindowHelper.EnableBlur(this);
Expand Down

0 comments on commit fe6dae6

Please sign in to comment.