mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-09-17 09:55:34 +08:00
Add rule widget
Adds a new rule widget. Also fixes some bugs I encountered while testing some unrelated things in an extremely small console.
This commit is contained in:

committed by
Patrik Svensson

parent
1410cba6c5
commit
5a1b8a1710
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using Spectre.Console;
|
||||
|
||||
namespace ColorExample
|
||||
@@ -24,7 +25,7 @@ namespace ColorExample
|
||||
|
||||
AnsiConsole.ResetColors();
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.MarkupLine("[bold underline]3-bit Colors[/]");
|
||||
AnsiConsole.Render(new Rule("[yellow bold underline]3-bit Colors[/]").SetStyle("grey").LeftAligned());
|
||||
AnsiConsole.WriteLine();
|
||||
|
||||
for (var i = 0; i < 8; i++)
|
||||
@@ -47,7 +48,7 @@ namespace ColorExample
|
||||
|
||||
AnsiConsole.ResetColors();
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.MarkupLine("[bold underline]4-bit Colors[/]");
|
||||
AnsiConsole.Render(new Rule("[yellow bold underline]4-bit Colors[/]").SetStyle("grey").LeftAligned());
|
||||
AnsiConsole.WriteLine();
|
||||
|
||||
for (var i = 0; i < 16; i++)
|
||||
@@ -70,7 +71,7 @@ namespace ColorExample
|
||||
|
||||
AnsiConsole.ResetColors();
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.MarkupLine("[bold underline]8-bit Colors[/]");
|
||||
AnsiConsole.Render(new Rule("[yellow bold underline]8-bit Colors[/]").SetStyle("grey").LeftAligned());
|
||||
AnsiConsole.WriteLine();
|
||||
|
||||
for (var i = 0; i < 16; i++)
|
||||
@@ -97,7 +98,7 @@ namespace ColorExample
|
||||
|
||||
AnsiConsole.ResetColors();
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.MarkupLine("[bold underline]24-bit Colors[/]");
|
||||
AnsiConsole.Render(new Rule("[yellow bold underline]24-bit Colors[/]").SetStyle("grey").LeftAligned());
|
||||
AnsiConsole.WriteLine();
|
||||
|
||||
var index = 0;
|
||||
|
Reference in New Issue
Block a user