From de7c09f047692f0c767d37b2f8a849526a248529 Mon Sep 17 00:00:00 2001 From: Diogo Trindade Date: Fri, 14 Jul 2023 23:19:28 +0100 Subject: [PATCH] Core - Override ColorSwatch.ToString This cleans up the datamodel viewer a lot, currently since ColorSwatch is a struct, it has a very long name. Since the properties can be seen by looking at the children in the datamodel, this information is useless. --- .../ColorScience/Quantization/ColorSwatch.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Artemis.Core/ColorScience/Quantization/ColorSwatch.cs b/src/Artemis.Core/ColorScience/Quantization/ColorSwatch.cs index 16dd769b3..602f3d480 100644 --- a/src/Artemis.Core/ColorScience/Quantization/ColorSwatch.cs +++ b/src/Artemis.Core/ColorScience/Quantization/ColorSwatch.cs @@ -1,4 +1,5 @@ -using SkiaSharp; +using System.Text; +using SkiaSharp; namespace Artemis.Core.ColorScience; @@ -36,4 +37,14 @@ public readonly record struct ColorSwatch /// The component. /// public SKColor DarkMuted { get; init; } + + /// + /// Override the record ToString method, + /// so we get a cleaner datamodel viewer + /// + /// + public override string? ToString() + { + return base.ToString(); + } } \ No newline at end of file