mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 05:18:16 +08:00
Add Layout widget (#1041)
* Add width to panels * Add height to panels * Replace RenderContext with RenderOptions * Remove exclusivity from alternative buffer * Add Layout widget * Add Align widget
This commit is contained in:
@ -58,9 +58,9 @@ public static class Program
|
||||
var table = new Table().BorderColor(Color.Grey).Title("Aligned").RoundedBorder();
|
||||
table.AddColumns("[grey]Alignment[/]", "[grey]Path[/]");
|
||||
|
||||
table.AddRow(new Text("Left"), new TextPath(path).LeftAligned());
|
||||
table.AddRow(new Text("Left"), new TextPath(path).LeftJustified());
|
||||
table.AddRow(new Text("Center"), new TextPath(path).Centered());
|
||||
table.AddRow(new Text("Right"), new TextPath(path).RightAligned());
|
||||
table.AddRow(new Text("Right"), new TextPath(path).RightJustified());
|
||||
|
||||
AnsiConsole.Write(table);
|
||||
}
|
||||
|
Reference in New Issue
Block a user