Refactor: use ThemeHelper.CopyStyle for style copying

Replaced direct calls to CopyStyle with ThemeHelper.CopyStyle in Theme.cs. This centralizes style copying logic and improves code organization and maintainability.
This commit is contained in:
Jack251970 2026-03-09 18:17:47 +08:00
parent 40f1438f99
commit ac404666bb

View file

@ -485,7 +485,7 @@ namespace Flow.Launcher.Core.Resource
// Get a new unsealed style based on the old one, and copy Resources and Triggers
var newWindowBorderStyle = new Style(typeof(Border));
CopyStyle(windowBorderStyle, newWindowBorderStyle);
ThemeHelper.CopyStyle(windowBorderStyle, newWindowBorderStyle);
// Identify existing Margin to calculate new Margin, and copy other setters
Setter existingMarginSetter = null;
@ -555,7 +555,7 @@ namespace Flow.Launcher.Core.Resource
// Get a new unsealed style based on the old one, and copy Resources and Triggers
var newWindowBorderStyle = new Style(typeof(Border));
CopyStyle(windowBorderStyle, newWindowBorderStyle);
ThemeHelper.CopyStyle(windowBorderStyle, newWindowBorderStyle);
// Copy Setters, excluding the Effect setter and updating the Margin setter
foreach (var setterBase in windowBorderStyle.Setters)