From 2bf6e2634c2e0d32445ca8d4f38c0dc10d2272e3 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Mon, 9 Mar 2026 18:17:50 +0800 Subject: [PATCH] Simplify style copying by setting BasedOn directly Refactored ThemeHelper.CopyStyle to assign the target style's BasedOn property directly from the original style, instead of recursively copying base style properties. This reduces complexity and ensures correct style inheritance. --- Flow.Launcher.Core/Resource/ThemeHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/Resource/ThemeHelper.cs b/Flow.Launcher.Core/Resource/ThemeHelper.cs index cd6b04c53..bf89cdd1d 100644 --- a/Flow.Launcher.Core/Resource/ThemeHelper.cs +++ b/Flow.Launcher.Core/Resource/ThemeHelper.cs @@ -8,10 +8,10 @@ public static class ThemeHelper { public static void CopyStyle(Style originalStyle, Style targetStyle) { - // If the style is based on another style, copy the base style first + // If the style is based on another style, use the same base style for the target style if (originalStyle.BasedOn != null) { - CopyStyle(originalStyle.BasedOn, targetStyle); + targetStyle.BasedOn = originalStyle.BasedOn; } // Copy the setters from the original style