Commit graph

5 commits

Author SHA1 Message Date
Jack251970
3c82661262 Remove duplicate Margin and Effect setters in theme code
Ensure existing Margin and Effect setters are removed from
newWindowBorderStyle before adding new ones. This prevents
duplicate property setters and ensures only the latest values
are applied.
2026-03-09 18:54:10 +08:00
Jack251970
2bf6e2634c 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.
2026-03-09 18:17:50 +08:00
Jack251970
7766d7053d Rename GetFreezeSolidColorBrush to GetFrozenSolidColorBrush
Renamed the method GetFreezeSolidColorBrush to GetFrozenSolidColorBrush in ThemeHelper.cs for improved naming consistency. Updated all references in Theme.cs accordingly. No changes to functionality.
2026-03-08 23:49:09 +08:00
Jack251970
36e15d3809 Refactor: move CopyStyle to ThemeHelper class
Moved the CopyStyle method from Theme to a new static ThemeHelper class for better code organization and reusability. Updated all references in Theme to use ThemeHelper.CopyStyle. Added ThemeHelper.cs and necessary using directives.
2026-03-08 23:48:10 +08:00
Jack251970
ed14c45fd2 Refactor brush creation with ThemeHelper utility
Introduce ThemeHelper.GetFreezeSolidColorBrush to centralize and reuse SolidColorBrush creation and freezing logic. Refactor Theme.cs to use this helper, improving code clarity and maintainability. Also, use Brushes.Transparent directly where appropriate.
2026-03-08 23:46:08 +08:00