Addded comments to remind myself of issues

This commit is contained in:
Tig
2024-04-29 12:47:48 -06:00
parent a75d5b7966
commit f51ec9cf66
4 changed files with 11 additions and 2 deletions

View File

@@ -794,6 +794,7 @@ public partial class View
private void LayoutSubview (View v, Size contentSize)
{
// BUGBUG: Calling SetRelativeLayout before LayoutSubviews is problematic. Need to resolve.
v.SetRelativeLayout (contentSize);
v.LayoutSubviews ();
v.LayoutNeeded = false;

View File

@@ -265,6 +265,13 @@ public class Slider<T> : View
Enter += (s, e) => { };
// BUGBUG: This should not be needed - Need to ensure SetRelativeLayout gets called during EndInit
Initialized += (s, e) =>
{
CalcSpacingConfig ();
SetContentSizeBestFit ();
};
LayoutStarted += (s, e) =>
{
CalcSpacingConfig ();

View File

@@ -27,7 +27,7 @@ public class ContentScrolling : Scenario
BorderStyle = LineStyle.Rounded;
Arrangement = ViewArrangement.Fixed;
ContentSize = new (10, 40);
ContentSize = new (60, 40);
ViewportSettings |= ViewportSettings.ClearContentOnly;
ViewportSettings |= ViewportSettings.ClipContentOnly;

View File

@@ -508,8 +508,9 @@ public class SliderTests
view.BeginInit ();
view.EndInit ();
// BUGBUG: This should not be needed. EndInit should have called LayoutSubviews
// BUGBUG: and LayoutSubviews should have
view.LayoutSubviews ();
slider.SetRelativeLayout(view.Viewport.Size);
Size expectedSize = slider.Frame.Size;