mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2026-01-01 16:59:37 +01:00
Add option to show separator between table rows (#1304)
* Add option to show separator between table rows * Panels should show header if borders are not shown Closes #835
This commit is contained in:
@@ -13,7 +13,12 @@ public abstract partial class TableBorder
|
||||
/// <summary>
|
||||
/// Gets the safe border for this border or <c>null</c> if none exist.
|
||||
/// </summary>
|
||||
public virtual TableBorder? SafeBorder { get; }
|
||||
public virtual TableBorder? SafeBorder { get; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the border supports row separators or not.
|
||||
/// </summary>
|
||||
public virtual bool SupportsRowSeparator { get; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the string representation of a specified table border part.
|
||||
@@ -81,6 +86,11 @@ public abstract partial class TableBorder
|
||||
(GetPart(TableBorderPart.HeaderBottomLeft), GetPart(TableBorderPart.HeaderBottom),
|
||||
GetPart(TableBorderPart.HeaderBottomSeparator), GetPart(TableBorderPart.HeaderBottomRight)),
|
||||
|
||||
// Separator between header and cells
|
||||
TablePart.RowSeparator =>
|
||||
(GetPart(TableBorderPart.RowLeft), GetPart(TableBorderPart.RowCenter),
|
||||
GetPart(TableBorderPart.RowSeparator), GetPart(TableBorderPart.RowRight)),
|
||||
|
||||
// Separator between footer and cells
|
||||
TablePart.FooterSeparator =>
|
||||
(GetPart(TableBorderPart.FooterTopLeft), GetPart(TableBorderPart.FooterTop),
|
||||
|
||||
Reference in New Issue
Block a user