Skip to content

Commit

Permalink
fix saved color brush not loading for RadialLayer
Browse files Browse the repository at this point in the history
  • Loading branch information
Aytackydln committed Nov 22, 2024
1 parent bddb528 commit 5dfab32
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5dfab32

Please sign in to comment.