From 5dfab326f04564401bfc5192050f9a6615428b6c Mon Sep 17 00:00:00 2001 From: Aytackydln Date: Fri, 22 Nov 2024 22:11:31 +0100 Subject: [PATCH] fix saved color brush not loading for RadialLayer --- .../Project-Aurora/Settings/Layers/RadialLayerHandler.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Project-Aurora/Project-Aurora/Settings/Layers/RadialLayerHandler.cs b/Project-Aurora/Project-Aurora/Settings/Layers/RadialLayerHandler.cs index e7fd5fffb..a5927c6a6 100644 --- a/Project-Aurora/Project-Aurora/Settings/Layers/RadialLayerHandler.cs +++ b/Project-Aurora/Project-Aurora/Settings/Layers/RadialLayerHandler.cs @@ -13,11 +13,15 @@ namespace AuroraRgb.Settings.Layers; public partial class RadialLayerProperties : LayerHandlerProperties { private static readonly SegmentedRadialBrushFactory DefaultFactory = new(new ColorStopCollection( - new[] { Color.Red, Color.Orange, Color.Yellow, Color.Lime, Color.Cyan, Color.Blue, Color.Purple, Color.Red })); + [Color.Red, Color.Orange, Color.Yellow, Color.Lime, Color.Cyan, Color.Blue, Color.Purple, Color.Red])); private SegmentedRadialBrushFactory? _brush; [JsonProperty("_Brush")] - public SegmentedRadialBrushFactory Brush => Logic?._brush ?? _brush ?? DefaultFactory; + public SegmentedRadialBrushFactory Brush + { + get => Logic?._brush ?? _brush ?? DefaultFactory; + set => _brush = value; + } // Number of degrees per second the brush rotates at. private int? _animationSpeed;