Merge pull request #3323 from tig/v2_3269_Bounds-ContentArea

Fixes #3169. `Bounds` -> `Viewport`: Content Scrolling in `View`
This commit is contained in:
Tig
2024-04-16 06:37:37 -06:00
committed by GitHub
136 changed files with 5589 additions and 3076 deletions

View File

@@ -172,7 +172,8 @@ public class ApplicationTests
// Don't check Application.ForceDriver
// Assert.Empty (Application.ForceDriver);
Assert.False (Application.Force16Colors);
// Don't check Application.Force16Colors
//Assert.False (Application.Force16Colors);
Assert.Null (Application.Driver);
Assert.Null (Application.MainLoop);
Assert.False (Application.EndAfterFirstIteration);
@@ -808,7 +809,11 @@ public class ApplicationTests
Init ();
// Don't use Dialog here as it has more layout logic. Use Window instead.
var w = new Window { Width = 5, Height = 5 };
var w = new Window
{
Width = 5, Height = 5,
Arrangement = ViewArrangement.Movable
};
((FakeDriver)Application.Driver).SetBufferSize (10, 10);
RunState rs = Application.Begin (w);

View File

@@ -60,7 +60,7 @@ public class MouseTests
/// <summary>
/// Tests that the mouse coordinates passed to the focused view are correct when the mouse is clicked. No adornments;
/// Frame == Bounds
/// Frame == Viewport
/// </summary>
[Theory]
[AutoInitShutdown]
@@ -134,7 +134,7 @@ public class MouseTests
/// <summary>
/// Tests that the mouse coordinates passed to the focused view are correct when the mouse is clicked. With
/// Frames; Frame != Bounds
/// Frames; Frame != Viewport
/// </summary>
[AutoInitShutdown]
[Theory]
@@ -207,7 +207,7 @@ public class MouseTests
var view = new View { X = pos.X, Y = pos.Y, Width = size.Width, Height = size.Height };
// Give the view a border. With PR #2920, mouse clicks are only passed if they are inside the view's Bounds.
// Give the view a border. With PR #2920, mouse clicks are only passed if they are inside the view's Viewport.
view.BorderStyle = LineStyle.Single;
view.CanFocus = true;