Skip to content

Commit

Permalink
Merge pull request #1143 from wbaldoumas/alignment-vs-justification-d…
Browse files Browse the repository at this point in the history
…ocs-fixes
  • Loading branch information
patriksvensson authored Jan 26, 2023
2 parents beca0b2 + 62b30d6 commit e042fe1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/input/widgets/figlet.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Spectre.Console can render [FIGlet](http://www.figlet.org/) text by using the `F
```csharp
AnsiConsole.Write(
new FigletText("Hello")
.LeftAligned()
.LeftJustified()
.Color(Color.Red));
```

Expand All @@ -26,6 +26,6 @@ var font = FigletFont.Load("starwars.flf");

AnsiConsole.Write(
new FigletText(font, "Hello")
.LeftAligned()
.LeftJustified()
.Color(Color.Red));
```
14 changes: 7 additions & 7 deletions docs/input/widgets/grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ grid.AddColumn();

// Add header row
grid.AddRow(new Text[]{
new Text("Header 1", new Style(Color.Red, Color.Black)).LeftAligned(),
new Text("Header 1", new Style(Color.Red, Color.Black)).LeftJustified(),
new Text("Header 2", new Style(Color.Green, Color.Black)).Centered(),
new Text("Header 3", new Style(Color.Blue, Color.Black)).RightAligned()
new Text("Header 3", new Style(Color.Blue, Color.Black)).RightJustified()
});

// Add content row
grid.AddRow(new Text[]{
new Text("Row 1").LeftAligned(),
new Text("Row 1").LeftJustified(),
new Text("Row 2").Centered(),
new Text("Row 3").RightAligned()
new Text("Row 3").RightJustified()
});

// Write centered cell grid contents to Console
Expand All @@ -73,9 +73,9 @@ grid.AddColumn();

// Add header row
grid.AddRow(new Text[]{
new Text("Header 1", new Style(Color.Red, Color.Black)).LeftAligned(),
new Text("Header 1", new Style(Color.Red, Color.Black)).LeftJustified(),
new Text("Header 2", new Style(Color.Green, Color.Black)).Centered(),
new Text("Header 3", new Style(Color.Blue, Color.Black)).RightAligned()
new Text("Header 3", new Style(Color.Blue, Color.Black)).RightJustified()
});

var embedded = new Grid();
Expand All @@ -88,7 +88,7 @@ embedded.AddRow(new Text("Embedded III"), new Text("Embedded IV"));

// Add content row
grid.AddRow(
new Text("Row 1").LeftAligned(),
new Text("Row 1").LeftJustified(),
new Text("Row 2").Centered(),
embedded
);
Expand Down
2 changes: 1 addition & 1 deletion docs/input/widgets/rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ You can also specify it via an extension method:

```csharp
var rule = new Rule("[red]Hello[/]");
rule.LeftAligned();
rule.LeftJustified();
AnsiConsole.Write(rule);
```

Expand Down
2 changes: 1 addition & 1 deletion docs/input/widgets/text-path.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ You can also specify styles via extension methods:

```csharp
var path = new TextPath("C:/This/Path/Is/Too/Long/To/Fit/In/The/Area.txt")
.RightAligned();
.RightJustified();
```

## Styling
Expand Down

0 comments on commit e042fe1

Please sign in to comment.