mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-29 09:18:01 +01:00
Address todos
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user