ContentSize to protected internal.

Broke some stuff.
This commit is contained in:
Tig
2024-05-27 22:18:15 -06:00
parent f7c451b5fa
commit 5ceb56a06b
6 changed files with 7 additions and 4 deletions

View File

@@ -100,7 +100,7 @@ public partial class View
public Size ContentSize
{
get => _contentSize ?? Viewport.Size;
set => SetContentSize (value);
protected internal set => SetContentSize (value);
}
/// <summary>

View File

@@ -23,7 +23,7 @@ namespace Terminal.Gui;
public partial class Toplevel : View
{
/// <summary>
/// Initializes a new instance of the <see cref="Toplevel"/> class with <see cref="LayoutStyle.Computed"/> layout,
/// Initializes a new instance of the <see cref="Toplevel"/> class,
/// defaulting to full screen. The <see cref="View.Width"/> and <see cref="View.Height"/> properties will be set to the
/// dimensions of the terminal using <see cref="Dim.Fill"/>.
/// </summary>

View File

@@ -235,6 +235,7 @@ public class ASCIICustomButtonTest : Scenario
pages++;
}
// BUGBUG: set_ContentSize is supposed to be `protected`.
_scrollView.ContentSize = new (25, pages * BUTTONS_ON_PAGE * BUTTON_HEIGHT);
if (_smallerWindow)

View File

@@ -29,6 +29,7 @@ public class Clipping : Scenario
var scrollView = new ScrollView { X = 3, Y = 3, Width = 50, Height = 20 };
scrollView.ColorScheme = Colors.ColorSchemes ["Menu"];
// BUGBUG: set_ContentSize is supposed to be `protected`.
scrollView.ContentSize = new (200, 100);
//ContentOffset = Point.Empty,

View File

@@ -244,7 +244,7 @@ public class ContentScrolling : Scenario
return;
}
// BUGBUG: set_ContentSize is supposed to be `protected`.
view.ContentSize = view.ContentSize with { Width = e.NewValue };
}
@@ -272,7 +272,7 @@ public class ContentScrolling : Scenario
return;
}
// BUGBUG: set_ContentSize is supposed to be `protected`.
view.ContentSize = view.ContentSize with { Height = e.NewValue };
}

View File

@@ -44,6 +44,7 @@ public class Scrolling : Scenario
ShowVerticalScrollIndicator = true,
ShowHorizontalScrollIndicator = true
};
// BUGBUG: set_ContentSize is supposed to be `protected`.
scrollView.ContentSize = new (120, 40);
scrollView.Padding.Thickness = new (1);