mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
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:
parent
40f1438f99
commit
ac404666bb
1 changed files with 2 additions and 2 deletions
|
|
@ -485,7 +485,7 @@ namespace Flow.Launcher.Core.Resource
|
||||||
|
|
||||||
// Get a new unsealed style based on the old one, and copy Resources and Triggers
|
// Get a new unsealed style based on the old one, and copy Resources and Triggers
|
||||||
var newWindowBorderStyle = new Style(typeof(Border));
|
var newWindowBorderStyle = new Style(typeof(Border));
|
||||||
CopyStyle(windowBorderStyle, newWindowBorderStyle);
|
ThemeHelper.CopyStyle(windowBorderStyle, newWindowBorderStyle);
|
||||||
|
|
||||||
// Identify existing Margin to calculate new Margin, and copy other setters
|
// Identify existing Margin to calculate new Margin, and copy other setters
|
||||||
Setter existingMarginSetter = null;
|
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
|
// Get a new unsealed style based on the old one, and copy Resources and Triggers
|
||||||
var newWindowBorderStyle = new Style(typeof(Border));
|
var newWindowBorderStyle = new Style(typeof(Border));
|
||||||
CopyStyle(windowBorderStyle, newWindowBorderStyle);
|
ThemeHelper.CopyStyle(windowBorderStyle, newWindowBorderStyle);
|
||||||
|
|
||||||
// Copy Setters, excluding the Effect setter and updating the Margin setter
|
// Copy Setters, excluding the Effect setter and updating the Margin setter
|
||||||
foreach (var setterBase in windowBorderStyle.Setters)
|
foreach (var setterBase in windowBorderStyle.Setters)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue