Skip to content

Commit

Permalink
Allow user to use HeaderThroughline with HeaderOverline and HeaderUnd…
Browse files Browse the repository at this point in the history
…erline even though it's a strange choice
  • Loading branch information
Nutzzz committed Feb 1, 2024
1 parent b28d72e commit d3c9a26
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Terminal.Gui/Views/TableView/TableView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -347,9 +347,7 @@ public override void OnDrawContent (Rect contentArea)

Move (current.X, yh);

if (current.Width - colName.Length > 0
&& Style.ShowHorizontalHeaderThroughline
&& (!Style.ShowHorizontalHeaderOverline || !Style.ShowHorizontalHeaderUnderline)) {
if (current.Width > colName.Length && Style.ShowHorizontalHeaderThroughline) {

if (colName.Sum (c => ((Rune)c).GetColumns ()) < current.Width) {
Driver.AddStr (colName);
Expand Down Expand Up @@ -462,8 +460,7 @@ private void RenderCellLines (int width, int height, ColumnToRender [] columnsTo
row++;
}
if (Style.ShowHeaders) {
if (Style.ShowHorizontalHeaderThroughline &&
(!Style.ShowHorizontalHeaderOverline || !Style.ShowHorizontalHeaderUnderline)) {
if (Style.ShowHorizontalHeaderThroughline) {
grid.AddLine (new Point (0, row), width, Orientation.Horizontal, Style.InnerHeaderBorderStyle);
}
row++;
Expand Down

0 comments on commit d3c9a26

Please sign in to comment.