diff --git a/Terminal.Gui/View/Layout/DimFill.cs b/Terminal.Gui/View/Layout/DimFill.cs index 27caa6aba..7550b87db 100644 --- a/Terminal.Gui/View/Layout/DimFill.cs +++ b/Terminal.Gui/View/Layout/DimFill.cs @@ -11,11 +11,6 @@ namespace Terminal.Gui; /// The margin to not fill. public record DimFill (int Margin) : Dim { - /// - /// Gets the margin to not fill. - /// - public int Margin { get; } = Margin; - /// public override string ToString () { return $"Fill({Margin})"; } diff --git a/Terminal.Gui/View/Layout/DimFunc.cs b/Terminal.Gui/View/Layout/DimFunc.cs index 8e110d8cd..c51406f40 100644 --- a/Terminal.Gui/View/Layout/DimFunc.cs +++ b/Terminal.Gui/View/Layout/DimFunc.cs @@ -8,19 +8,16 @@ namespace Terminal.Gui; /// This is a low-level API that is typically used internally by the layout system. Use the various static /// methods on the class to create objects instead. /// -/// -public record DimFunc (Func Dim) : Dim +/// The function that computes the dimension. +public record DimFunc (Func Fn) : Dim { /// /// Gets the function that computes the dimension. /// - public new Func Func { get; } = Dim; + public Func Fn { get; } = Fn; /// - public override int GetHashCode () { return Func.GetHashCode (); } + public override string ToString () { return $"DimFunc({Fn ()})"; } - /// - public override string ToString () { return $"DimFunc({Func ()})"; } - - internal override int GetAnchor (int size) { return Func (); } + internal override int GetAnchor (int size) { return Fn (); } } \ No newline at end of file diff --git a/Terminal.Gui/View/Layout/DimPercent.cs b/Terminal.Gui/View/Layout/DimPercent.cs index e62e4500d..e94be76a7 100644 --- a/Terminal.Gui/View/Layout/DimPercent.cs +++ b/Terminal.Gui/View/Layout/DimPercent.cs @@ -8,29 +8,24 @@ namespace Terminal.Gui; /// This is a low-level API that is typically used internally by the layout system. Use the various static /// methods on the class to create objects instead. /// -/// The percentage. +/// The percentage. /// /// If the dimension is computed using the View's position ( or /// ); otherwise, the dimension is computed using the View's . /// -public record DimPercent (int Percent, DimPercentMode Mode = DimPercentMode.ContentSize) : Dim +public record DimPercent (int Percentage, DimPercentMode Mode = DimPercentMode.ContentSize) : Dim { - /// - /// Gets the percentage. - /// - public new int Percent { get; } = Percent; - /// /// /// - public override string ToString () { return $"Percent({Percent},{Mode})"; } + public override string ToString () { return $"Percent({Percentage},{Mode})"; } /// /// Gets whether the dimension is computed using the View's position or GetContentSize (). /// public DimPercentMode Mode { get; } = Mode; - internal override int GetAnchor (int size) { return (int)(size * (Percent / 100f)); } + internal override int GetAnchor (int size) { return (int)(size * (Percentage / 100f)); } internal override int Calculate (int location, int superviewContentSize, View us, Dimension dimension) { diff --git a/Terminal.Gui/View/Layout/PosFunc.cs b/Terminal.Gui/View/Layout/PosFunc.cs index 4b06d180c..c449add14 100644 --- a/Terminal.Gui/View/Layout/PosFunc.cs +++ b/Terminal.Gui/View/Layout/PosFunc.cs @@ -4,22 +4,11 @@ namespace Terminal.Gui; /// /// Represents a position that is computed by executing a function that returns an integer position. /// -/// -/// -/// This is a low-level API that is typically used internally by the layout system. Use the various static -/// methods on the class to create objects instead. -/// -/// -/// The position. -public record PosFunc (Func Pos) : Pos +/// The function that computes the position. +public record PosFunc (Func Fn) : Pos { - /// - /// Gets the function that computes the position. - /// - public new Func Func { get; } = Pos; - /// - public override string ToString () { return $"PosFunc({Func ()})"; } + public override string ToString () { return $"PosFunc({Fn ()})"; } - internal override int GetAnchor (int size) { return Func (); } + internal override int GetAnchor (int size) { return Fn (); } } \ No newline at end of file