diff --git a/Terminal.Gui/Views/TileView.cs b/Terminal.Gui/Views/TileView.cs index c8d784e23..28ac8688a 100644 --- a/Terminal.Gui/Views/TileView.cs +++ b/Terminal.Gui/Views/TileView.cs @@ -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); - }*/ - } - } } /// diff --git a/UnitTests/TileViewTests.cs b/UnitTests/TileViewTests.cs index a0468e688..9891afad0 100644 --- a/UnitTests/TileViewTests.cs +++ b/UnitTests/TileViewTests.cs @@ -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. + /// /// Creates a vertical orientation root container with left pane split into /// two (with horizontal splitter line).