mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Adds ShowHorizontalBottomline (#2552)
This commit is contained in:
@@ -1991,6 +1991,68 @@ namespace Terminal.Gui.ViewsTests {
|
||||
|
||||
}
|
||||
|
||||
|
||||
[Fact, AutoInitShutdown]
|
||||
public void ShowHorizontalBottomLine_WithVerticalCellLines ()
|
||||
{
|
||||
var tableView = GetABCDEFTableView(out _);
|
||||
tableView.BeginInit (); tableView.EndInit ();
|
||||
|
||||
tableView.ColorScheme = Colors.TopLevel;
|
||||
|
||||
// 3 columns are visibile
|
||||
tableView.Bounds = new Rect (0, 0, 7, 5);
|
||||
tableView.Style.ShowHorizontalHeaderUnderline = true;
|
||||
tableView.Style.ShowHorizontalHeaderOverline = false;
|
||||
tableView.Style.AlwaysShowHeaders = true;
|
||||
tableView.Style.SmoothHorizontalScrolling = true;
|
||||
tableView.Style.ShowHorizontalBottomline = true;
|
||||
|
||||
tableView.Redraw (tableView.Bounds);
|
||||
|
||||
// user can only scroll right so sees right indicator
|
||||
// Because first column in table is A
|
||||
string expected =
|
||||
@"
|
||||
│A│B│C│
|
||||
├─┼─┼─►
|
||||
│1│2│3│
|
||||
└─┴─┴─┘";
|
||||
|
||||
TestHelpers.AssertDriverContentsAre (expected, output);
|
||||
}
|
||||
[Fact, AutoInitShutdown]
|
||||
public void ShowHorizontalBottomLine_NoCellLines ()
|
||||
{
|
||||
var tableView = GetABCDEFTableView (out _);
|
||||
tableView.BeginInit (); tableView.EndInit ();
|
||||
|
||||
tableView.ColorScheme = Colors.TopLevel;
|
||||
|
||||
// 3 columns are visibile
|
||||
tableView.Bounds = new Rect (0, 0, 7, 5);
|
||||
tableView.Style.ShowHorizontalHeaderUnderline = true;
|
||||
tableView.Style.ShowHorizontalHeaderOverline = false;
|
||||
tableView.Style.AlwaysShowHeaders = true;
|
||||
tableView.Style.SmoothHorizontalScrolling = true;
|
||||
tableView.Style.ShowHorizontalBottomline = true;
|
||||
tableView.Style.ShowVerticalCellLines = false;
|
||||
|
||||
tableView.Redraw (tableView.Bounds);
|
||||
|
||||
// user can only scroll right so sees right indicator
|
||||
// Because first column in table is A
|
||||
string expected =
|
||||
@"
|
||||
│A│B│C│
|
||||
└─┴─┴─►
|
||||
1 2 3
|
||||
───────";
|
||||
|
||||
TestHelpers.AssertDriverContentsAre (expected, output);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Builds a simple table of string columns with the requested number of columns and rows
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user