From 547bd46bb3e5272ca10edb4c559fb540f5af10b6 Mon Sep 17 00:00:00 2001 From: bao-qian Date: Sun, 29 Nov 2015 12:47:04 +0000 Subject: [PATCH] Disable blur when os is not supported Releated: #330 --- Wox.Core/Theme/Theme.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Wox.Core/Theme/Theme.cs b/Wox.Core/Theme/Theme.cs index 9475a9fa22..1317b5f9cc 100644 --- a/Wox.Core/Theme/Theme.cs +++ b/Wox.Core/Theme/Theme.cs @@ -168,10 +168,13 @@ namespace Wox.Core.Theme /// Sets the blur for a window via SetWindowCompositionAttribute /// /// window to blur - /// true/false - on or off correspondingly - private void SetBlurForWindow(Window wind, bool status) + /// true/false - on or off correspondingly + private void SetBlurForWindow(Window wind, bool isBlur) { - SetWindowAccent(wind, status ? AccentState.ACCENT_ENABLE_BLURBEHIND : AccentState.ACCENT_DISABLED); + if (isBlur) + { + SetWindowAccent(wind, AccentState.ACCENT_ENABLE_BLURBEHIND); + } } private void SetWindowAccent(Window wind, AccentState themeAccentMode)