mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
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.
13 lines
286 B
C#
13 lines
286 B
C#
using System.Windows.Media;
|
|
|
|
namespace Flow.Launcher.Core.Resource;
|
|
|
|
public static class ThemeHelper
|
|
{
|
|
public static SolidColorBrush GetFreezeSolidColorBrush(Color color)
|
|
{
|
|
var brush = new SolidColorBrush(color);
|
|
brush.Freeze();
|
|
return brush;
|
|
}
|
|
}
|