Backed out some changes and fixed unit tests

This commit is contained in:
Tig
2024-03-31 10:21:04 -06:00
parent 207c974327
commit 9b75effe49
3 changed files with 9 additions and 7 deletions

View File

@@ -66,7 +66,7 @@ public partial class View
{
if (_frame == value)
{
return;
//return;
}
_frame = value with { Width = Math.Max (value.Width, 0), Height = Math.Max (value.Height, 0) };
@@ -169,7 +169,7 @@ public partial class View
if (Equals (_x, value))
{
return;
//return;
}
OnResizeNeeded ();
}
@@ -205,7 +205,7 @@ public partial class View
{
if (Equals (_y, value))
{
return;
//return;
}
_y = value ?? throw new ArgumentNullException (nameof (value), @$"{nameof (Y)} cannot be null");
@@ -243,7 +243,7 @@ public partial class View
{
if (Equals (_height, value))
{
return;
//return;
}
_height = value ?? throw new ArgumentNullException (nameof (value), @$"{nameof (Height)} cannot be null");
@@ -298,7 +298,7 @@ public partial class View
{
if (Equals (_width, value))
{
return;
// return;
}
_width = value ?? throw new ArgumentNullException (nameof (value), @$"{nameof (Width)} cannot be null");

View File

@@ -550,7 +550,8 @@ public class ToScreenTests (ITestOutputHelper output)
View view = new ()
{
Width = 10,
Height = 10
Height = 10,
ScrollSettings = ScrollSettings.NoRestrict
};
Rectangle testRect = new Rectangle (0, 0, 1, 1);

View File

@@ -160,7 +160,8 @@ public class ViewportTests (ITestOutputHelper output)
View view = new ()
{
Width = 10,
Height = 10
Height = 10,
ScrollSettings = ScrollSettings.NoRestrict
};
Assert.Equal (new Rectangle (0, 0, 10, 10), view.Frame);