mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
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.
This commit is contained in:
parent
ac404666bb
commit
2bf6e2634c
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue