Skip to content

Commit e10d4f7

Browse files
committed
Skip RemoveDropShadowEffectFromCurrentTheme for blur themes
The method was loading raw theme XAML and directly setting WindowBorderStyle, always overriding SetBlurForWindow's transparent background and CornerRadius=0 Should fix #4457
1 parent 26f09e3 commit e10d4f7

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

Flow.Launcher.Core/Resource/Theme.cs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -643,17 +643,8 @@ await Application.Current.Dispatcher.InvokeAsync(() =>
643643
// Remove OS minimizing/maximizing animation
644644
// Methods.SetWindowAttribute(new WindowInteropHelper(mainWindow).Handle, DWMWINDOWATTRIBUTE.DWMWA_TRANSITIONS_FORCEDISABLED, 3);
645645

646-
// The timing of adding the shadow effect should vary depending on whether the theme is transparent.
647-
if (BlurEnabled)
648-
{
649-
AutoDropShadow(useDropShadowEffect);
650-
}
651646
SetBlurForWindow(_settings.Theme, backdropType);
652-
653-
if (!BlurEnabled)
654-
{
655-
AutoDropShadow(useDropShadowEffect);
656-
}
647+
AutoDropShadow(useDropShadowEffect);
657648
}, DispatcherPriority.Render);
658649
}
659650

@@ -747,10 +738,11 @@ private void AutoDropShadow(bool useDropShadowEffect)
747738
{
748739
if (BlurEnabled && Win32Helper.IsBackdropSupported())
749740
{
750-
// For themes with blur enabled, the window border is rendered by the system,
751-
// so we set corner preference to round and remove drop shadow effect to avoid rendering issues.
741+
// Blur themes: DWM handles corners. Clear any stale directly-set
742+
// resource so the merged dictionary entry (from SetBlurForWindow) wins.
752743
SetWindowCornerPreference("Round");
753-
RemoveDropShadowEffectFromCurrentTheme();
744+
if (Application.Current.Resources.Contains("WindowBorderStyle"))
745+
Application.Current.Resources.Remove("WindowBorderStyle");
754746
}
755747
else
756748
{

0 commit comments

Comments
 (0)