From 7b855745d962ac34f5106eb001d167dd9a3053bc Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sat, 28 Feb 2026 22:45:23 +0800 Subject: [PATCH] Refactor drop shadow logic in Theme.cs for accuracy Moved RemoveDropShadowEffectFromCurrentTheme() into specific conditional branches within AutoDropShadow to ensure it is only called when appropriate. Explicitly set window corner preference and drop shadow effect based on theme and blur support, improving appearance consistency and logic clarity. --- Flow.Launcher.Core/Resource/Theme.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/Resource/Theme.cs b/Flow.Launcher.Core/Resource/Theme.cs index c67f93a33..b657a5950 100644 --- a/Flow.Launcher.Core/Resource/Theme.cs +++ b/Flow.Launcher.Core/Resource/Theme.cs @@ -757,13 +757,12 @@ namespace Flow.Launcher.Core.Resource private void AutoDropShadow(bool useDropShadowEffect) { - SetWindowCornerPreference("Default"); - RemoveDropShadowEffectFromCurrentTheme(); if (useDropShadowEffect) { if (BlurEnabled && Win32Helper.IsBackdropSupported()) { SetWindowCornerPreference("Round"); + RemoveDropShadowEffectFromCurrentTheme(); } else { @@ -776,9 +775,11 @@ namespace Flow.Launcher.Core.Resource if (BlurEnabled && Win32Helper.IsBackdropSupported()) { SetWindowCornerPreference("Default"); + RemoveDropShadowEffectFromCurrentTheme(); } else { + SetWindowCornerPreference("Default"); RemoveDropShadowEffectFromCurrentTheme(); } }