diff --git a/Terminal.Gui/View/Layout/PosDim.cs b/Terminal.Gui/View/Layout/PosDim.cs index 7bc76dfc2..b8d7e3e1e 100644 --- a/Terminal.Gui/View/Layout/PosDim.cs +++ b/Terminal.Gui/View/Layout/PosDim.cs @@ -614,7 +614,7 @@ public class Dim { /// Specifies how will compute the dimension. The default is . NOT CURRENTLY SUPPORTED. /// Specifies the minimum dimension that view will be automatically sized to. NOT CURRENTLY SUPPORTED. /// Specifies the maximum dimension that view will be automatically sized to. NOT CURRENTLY SUPPORTED. - public static Dim Auto (DimAutoStyle style = DimAutoStyle.Text, Dim min = null, Dim max = null) + public static Dim Auto (DimAutoStyle style = DimAutoStyle.Subviews, Dim min = null, Dim max = null) { if (style == DimAutoStyle.Text) { throw new NotImplementedException (@"DimAutoStyle.Text is not implemented."); @@ -657,10 +657,10 @@ public class Dim { public override string ToString () => $"Auto({_style},{_min},{_max})"; - internal override int Anchor (int width) - { - return width; - } + //internal override int Anchor (int width) + //{ + // return width; + //} public override int GetHashCode () { diff --git a/UICatalog/Scenarios/DimAutoSize.cs b/UICatalog/Scenarios/DimAutoSize.cs index 27c1b1011..b3fa600a4 100644 --- a/UICatalog/Scenarios/DimAutoSize.cs +++ b/UICatalog/Scenarios/DimAutoSize.cs @@ -7,18 +7,6 @@ namespace UICatalog.Scenarios; public class DimAutoSize : Scenario { public override void Init () { - // The base `Scenario.Init` implementation: - // - Calls `Application.Init ()` - // - Adds a full-screen Window to Application.Top with a title - // that reads "Press to Quit". Access this Window with `this.Win`. - // - Sets the Theme & the ColorScheme property of `this.Win` to `colorScheme`. - // To override this, implement an override of `Init`. - - //base.Init (); - - // A common, alternate, implementation where `this.Win` is not used is below. This code - // leverages ConfigurationManager to borrow the color scheme settings from UICatalog: - Application.Init (); ConfigurationManager.Themes.Theme = Theme; ConfigurationManager.Apply (); @@ -27,11 +15,6 @@ public class DimAutoSize : Scenario { public override void Setup () { - // Put scenario code here (in a real app, this would be the code - // that would setup the app before `Application.Run` is called`). - // With a Scenario, after UI Catalog calls `Scenario.Setup` it calls - // `Scenario.Run` which calls `Application.Run`. Example: - var textField = new TextField { Text = "Type here", X = 1, Y = 0, Width = 20, Height = 1 }; var label = new Label {