Fixes #3064. Pos.View returns PosCombine (#3065)

This commit is contained in:
BDisp
2023-12-19 23:34:17 +00:00
committed by GitHub
parent 06ad562bc6
commit 74afd18148
8 changed files with 104 additions and 70 deletions

View File

@@ -539,12 +539,12 @@ namespace Terminal.Gui.ViewsTests {
Assert.True (_scrollBar.Visible);
Assert.Equal ("Absolute(1)", _scrollBar.Width.ToString ());
Assert.Equal (1, _scrollBar.Bounds.Width);
Assert.Equal ("Combine(View(Height,HostView()((0,0,80,25)))-Absolute(1))",
Assert.Equal ("Combine(View(Height,HostView()(0,0,80,25))-Absolute(1))",
_scrollBar.Height.ToString ());
Assert.Equal (24, _scrollBar.Bounds.Height);
Assert.True (_scrollBar.OtherScrollBarView.ShowScrollIndicator);
Assert.True (_scrollBar.OtherScrollBarView.Visible);
Assert.Equal ("Combine(View(Width,HostView()((0,0,80,25)))-Absolute(1))",
Assert.Equal ("Combine(View(Width,HostView()(0,0,80,25))-Absolute(1))",
_scrollBar.OtherScrollBarView.Width.ToString ());
Assert.Equal (79, _scrollBar.OtherScrollBarView.Bounds.Width);
Assert.Equal ("Absolute(1)", _scrollBar.OtherScrollBarView.Height.ToString ());
@@ -556,12 +556,12 @@ namespace Terminal.Gui.ViewsTests {
Assert.False (_scrollBar.Visible);
Assert.Equal ("Absolute(1)", _scrollBar.Width.ToString ());
Assert.Equal (1, _scrollBar.Bounds.Width);
Assert.Equal ("Combine(View(Height,HostView()((0,0,80,25)))-Absolute(1))",
Assert.Equal ("Combine(View(Height,HostView()(0,0,80,25))-Absolute(1))",
_scrollBar.Height.ToString ());
Assert.Equal (24, _scrollBar.Bounds.Height);
Assert.True (_scrollBar.OtherScrollBarView.ShowScrollIndicator);
Assert.True (_scrollBar.OtherScrollBarView.Visible);
Assert.Equal ("View(Width,HostView()((0,0,80,25)))",
Assert.Equal ("View(Width,HostView()(0,0,80,25))",
_scrollBar.OtherScrollBarView.Width.ToString ());
Assert.Equal (80, _scrollBar.OtherScrollBarView.Bounds.Width);
Assert.Equal ("Absolute(1)", _scrollBar.OtherScrollBarView.Height.ToString ());
@@ -573,12 +573,12 @@ namespace Terminal.Gui.ViewsTests {
Assert.False (_scrollBar.Visible);
Assert.Equal ("Absolute(1)", _scrollBar.Width.ToString ());
Assert.Equal (1, _scrollBar.Bounds.Width);
Assert.Equal ("Combine(View(Height,HostView()((0,0,80,25)))-Absolute(1))",
Assert.Equal ("Combine(View(Height,HostView()(0,0,80,25))-Absolute(1))",
_scrollBar.Height.ToString ());
Assert.Equal (24, _scrollBar.Bounds.Height);
Assert.False (_scrollBar.OtherScrollBarView.ShowScrollIndicator);
Assert.False (_scrollBar.OtherScrollBarView.Visible);
Assert.Equal ("View(Width,HostView()((0,0,80,25)))",
Assert.Equal ("View(Width,HostView()(0,0,80,25))",
_scrollBar.OtherScrollBarView.Width.ToString ());
Assert.Equal (80, _scrollBar.OtherScrollBarView.Bounds.Width);
Assert.Equal ("Absolute(1)", _scrollBar.OtherScrollBarView.Height.ToString ());
@@ -590,12 +590,12 @@ namespace Terminal.Gui.ViewsTests {
Assert.True (_scrollBar.Visible);
Assert.Equal ("Absolute(1)", _scrollBar.Width.ToString ());
Assert.Equal (1, _scrollBar.Bounds.Width);
Assert.Equal ("View(Height,HostView()((0,0,80,25)))",
Assert.Equal ("View(Height,HostView()(0,0,80,25))",
_scrollBar.Height.ToString ());
Assert.Equal (25, _scrollBar.Bounds.Height);
Assert.False (_scrollBar.OtherScrollBarView.ShowScrollIndicator);
Assert.False (_scrollBar.OtherScrollBarView.Visible);
Assert.Equal ("View(Width,HostView()((0,0,80,25)))",
Assert.Equal ("View(Width,HostView()(0,0,80,25))",
_scrollBar.OtherScrollBarView.Width.ToString ());
Assert.Equal (80, _scrollBar.OtherScrollBarView.Bounds.Width);
Assert.Equal ("Absolute(1)", _scrollBar.OtherScrollBarView.Height.ToString ());
@@ -607,12 +607,12 @@ namespace Terminal.Gui.ViewsTests {
Assert.True (_scrollBar.Visible);
Assert.Equal ("Absolute(1)", _scrollBar.Width.ToString ());
Assert.Equal (1, _scrollBar.Bounds.Width);
Assert.Equal ("Combine(View(Height,HostView()((0,0,80,25)))-Absolute(1))",
Assert.Equal ("Combine(View(Height,HostView()(0,0,80,25))-Absolute(1))",
_scrollBar.Height.ToString ());
Assert.Equal (24, _scrollBar.Bounds.Height);
Assert.True (_scrollBar.OtherScrollBarView.ShowScrollIndicator);
Assert.True (_scrollBar.OtherScrollBarView.Visible);
Assert.Equal ("Combine(View(Width,HostView()((0,0,80,25)))-Absolute(1))",
Assert.Equal ("Combine(View(Width,HostView()(0,0,80,25))-Absolute(1))",
_scrollBar.OtherScrollBarView.Width.ToString ());
Assert.Equal (79, _scrollBar.OtherScrollBarView.Bounds.Width);
Assert.Equal ("Absolute(1)", _scrollBar.OtherScrollBarView.Height.ToString ());