mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Fixes #2983. View need a alternative DrawFrame for the v2.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user