Browse Source

ContentSize to protected internal.
Broke some stuff.

Tig 1 year ago
parent
commit
5ceb56a06b

+ 1 - 1
Terminal.Gui/View/ViewContent.cs

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

+ 1 - 1
Terminal.Gui/Views/Toplevel.cs

@@ -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>

+ 1 - 0
UICatalog/Scenarios/ASCIICustomButton.cs

@@ -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)

+ 1 - 0
UICatalog/Scenarios/Clipping.cs

@@ -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,

+ 2 - 2
UICatalog/Scenarios/ContentScrolling.cs

@@ -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 };
         }
 

+ 1 - 0
UICatalog/Scenarios/Scrolling.cs

@@ -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);