Address todos

This commit is contained in:
Thomas
2023-01-28 15:08:14 +00:00
parent 933f26f122
commit 5d6ccb9cd4
2 changed files with 23 additions and 26 deletions

View File

@@ -926,32 +926,6 @@ namespace Terminal.Gui {
{
return IntegratedBorder != BorderStyle.None;
}
private bool HasAnyTitles ()
{
return tiles.Any (t => t.Title.Length > 0);
}
private class ChildSplitterLine {
readonly TileViewLineView currentLine;
internal ChildSplitterLine (TileViewLineView currentLine)
{
this.currentLine = currentLine;
}
internal void DrawTitles ()
{
//TODO: Implement this
/*if(currentLine.Orientation == Orientation.Horizontal)
{
var screenRect = currentLine.ViewToScreen (
new Rect(0,0,currentLine.Frame.Width,currentLine.Frame.Height));
Driver.DrawWindowTitle (screenRect, currentLine.Parent.View2Title, 0, 0, 0, 0);
}*/
}
}
}
/// <summary>

View File

@@ -1,6 +1,7 @@
using System;
using System.Linq;
using Terminal.Gui;
using Terminal.Gui.Graphs;
using Xunit;
using Xunit.Abstractions;
@@ -864,6 +865,28 @@ namespace UnitTests {
}
}
[Fact,AutoInitShutdown]
public void TestIsRoot_Yes()
{
var tv = new TileView{Width=10,Height=5,ColorScheme = new ColorScheme(),IntegratedBorder = BorderStyle.Single};
var tv2 = new TileView{Width=10,Height=5,ColorScheme = new ColorScheme(),IntegratedBorder = BorderStyle.Single,Orientation = Orientation.Horizontal};
Assert.True(tv.IsRootTileView());
tv.Tiles.ElementAt(0).View = tv2;
// tv2 is still considered a root because
// it was manually created by API user. That
// means it will not have its lines joined to
// parents and it is permitted to have a border
Assert.True(tv2.IsRootTileView());
// TODO: Test that this draws correctly with nested borders
}
// TODO: Add case showing no nested borders for child splits
// even when IntegratedBorder is set.
/// <summary>
/// Creates a vertical orientation root container with left pane split into
/// two (with horizontal splitter line).