Fixes #2983. View need a alternative DrawFrame for the v2.

This commit is contained in:
BDisp
2023-11-12 01:02:52 +00:00
parent 545e422ffa
commit dade9fd767
2 changed files with 38 additions and 1 deletions

View File

@@ -334,6 +334,23 @@ t ", output);
Application.Refresh ();
TestHelpers.AssertDriverContentsWithFrameAre ("", output);
}
[Fact, AutoInitShutdown]
public void DrawFrame_Test ()
{
var label = new View () { X = Pos.Center (), Y = Pos.Center (), Text = "test", AutoSize = true };
var view = new View () { Width = 10, Height = 5 };
view.DrawContentComplete += (s, e) => view.DrawFrame (view.Bounds, LineStyle.Single);
view.Add (label);
Application.Top.Add (view);
Application.Begin (Application.Top);
TestHelpers.AssertDriverContentsWithFrameAre (@"
┌────────┐
│ │
│ test │
│ │
└────────┘", output);
}
}
}