mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Added Padding button to Adornments scenario
This commit is contained in:
@@ -289,4 +289,49 @@ public class AdornmentTests
|
||||
adornment.Thickness = new Thickness (1, 2, 3, 4);
|
||||
Assert.True (raised);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Adornment_WithSubView_FindDeepestView_Finds ()
|
||||
{
|
||||
var view = new View () {
|
||||
Width = 10,
|
||||
Height = 10
|
||||
|
||||
};
|
||||
view.Padding.Thickness = new Thickness (1);
|
||||
|
||||
var subView = new View () {
|
||||
X = 0,
|
||||
Y =0,
|
||||
Width = 1,
|
||||
Height = 1
|
||||
};
|
||||
view.Padding.Add (subView);
|
||||
|
||||
Assert.Equal (subView, View.FindDeepestView (view, 0, 0));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Adornment_WithNonVisibleSubView_FindDeepestView_Finds_Adornment ()
|
||||
{
|
||||
var view = new View ()
|
||||
{
|
||||
Width = 10,
|
||||
Height = 10
|
||||
|
||||
};
|
||||
view.Padding.Thickness = new Thickness (1);
|
||||
|
||||
var subView = new View ()
|
||||
{
|
||||
X = 0,
|
||||
Y = 0,
|
||||
Width = 1,
|
||||
Height = 1,
|
||||
Visible = false
|
||||
};
|
||||
view.Padding.Add (subView);
|
||||
|
||||
Assert.Equal (view.Padding, View.FindDeepestView (view, 0, 0));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user