mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-31 02:08:03 +01:00
Temporarily made DimAutoStyle.Subviews default
This commit is contained in:
@@ -614,7 +614,7 @@ public class Dim {
|
||||
/// <param name="style">Specifies how <see cref="DimAuto"/> will compute the dimension. The default is <see cref="DimAutoStyle.Text"/>. NOT CURRENTLY SUPPORTED.</param>
|
||||
/// <param name="min">Specifies the minimum dimension that view will be automatically sized to. NOT CURRENTLY SUPPORTED.</param>
|
||||
/// <param name="min">Specifies the maximum dimension that view will be automatically sized to. NOT CURRENTLY SUPPORTED.</param>
|
||||
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 ()
|
||||
{
|
||||
|
||||
@@ -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 <hotkey> 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 {
|
||||
|
||||
Reference in New Issue
Block a user