From 9714e5464c6194b73ffdf9c4c3ff3fac6ed7279e Mon Sep 17 00:00:00 2001 From: Matt Parker <61717342+MattParkerDev@users.noreply.github.com> Date: Sun, 17 Aug 2025 11:42:30 +1000 Subject: [PATCH] diagnostic color by severity --- .../Problems/ProjectProblemComponent.razor | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/SharpIDE.Photino/Components/Problems/ProjectProblemComponent.razor b/src/SharpIDE.Photino/Components/Problems/ProjectProblemComponent.razor index c49ee59..f4aa414 100644 --- a/src/SharpIDE.Photino/Components/Problems/ProjectProblemComponent.razor +++ b/src/SharpIDE.Photino/Components/Problems/ProjectProblemComponent.razor @@ -5,10 +5,10 @@ @if (_diagnostics.Length is not 0) { - + @foreach (var diagnostic in _diagnostics) { - + } @@ -20,6 +20,14 @@ private ImmutableArray _diagnostics = []; + private static Color GetDiagnosticIconColour(Diagnostic diagnostic) => diagnostic.Severity switch + { + DiagnosticSeverity.Error => Color.Error, + DiagnosticSeverity.Warning => Color.Warning, + DiagnosticSeverity.Info => Color.Info, + _ => Color.Info + }; + protected override async Task OnInitializedAsync() { var diagnostics = await RoslynAnalysis.GetProjectDiagnostics(ProjectModel);