mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-19 13:28: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:
@ -11,14 +11,14 @@ public static class Program
|
||||
new Rule()
|
||||
.RuleStyle(Style.Parse("yellow"))
|
||||
.AsciiBorder()
|
||||
.LeftAligned());
|
||||
.LeftJustified());
|
||||
|
||||
// Left aligned title
|
||||
Render(
|
||||
new Rule("[blue]Left aligned[/]")
|
||||
.RuleStyle(Style.Parse("red"))
|
||||
.DoubleBorder()
|
||||
.LeftAligned());
|
||||
.LeftJustified());
|
||||
|
||||
// Centered title
|
||||
Render(
|
||||
@ -31,7 +31,7 @@ public static class Program
|
||||
Render(
|
||||
new Rule("[red]Right aligned[/]")
|
||||
.RuleStyle(Style.Parse("blue"))
|
||||
.RightAligned());
|
||||
.RightJustified());
|
||||
}
|
||||
|
||||
private static void Render(Rule rule)
|
||||
|
Reference in New Issue
Block a user