fix third core dump on export option
This commit is contained in:
Binary file not shown.
@@ -98,6 +98,7 @@ public static class StatsPanel
|
||||
/// <summary>
|
||||
/// Renders a horizontal block bar of the given width.
|
||||
/// e.g. [████████░░░░]
|
||||
/// Result is a markup string safe for embedding inside a larger Markup call.
|
||||
/// </summary>
|
||||
private static string BuildBar(double percent, int width, string color)
|
||||
{
|
||||
@@ -105,8 +106,11 @@ public static class StatsPanel
|
||||
filled = Math.Clamp(filled, 0, width);
|
||||
var empty = width - filled;
|
||||
|
||||
var bar = new string('\u2588', filled) + new string('\u2591', empty);
|
||||
return $"[[{color}]{bar}[/]]";
|
||||
// \u2588 = █ \u2591 = ░
|
||||
// [[ and ]] are Spectre escape sequences for literal [ and ]
|
||||
var filledStr = new string('\u2588', filled);
|
||||
var emptyStr = new string('\u2591', empty);
|
||||
return $"[[[{color}]{filledStr}[/][dim]{emptyStr}[/]]]";
|
||||
}
|
||||
|
||||
private static string CpuColor(double pct) => pct switch
|
||||
|
||||
Reference in New Issue
Block a user