Added // BUGBUG: Views should avoid setting Height as doing so implies Frame.Size == ContentSize

This commit is contained in:
Tig
2024-05-13 12:39:07 -06:00
parent ef9ee5a2e6
commit d27b0b6212
8 changed files with 10 additions and 10 deletions

View File

@@ -14,14 +14,14 @@ public class LineView : View
switch (orientation)
{
case Orientation.Horizontal:
Height = 1;
Height = 1; // BUGBUG: Views should avoid setting Height as doing so implies Frame.Size == ContentSize
Width = Dim.Fill ();
LineRune = Glyphs.HLine;
break;
case Orientation.Vertical:
Height = Dim.Fill ();
Width = 1;
Width = 1; // BUGBUG: Views should avoid setting Height as doing so implies Frame.Size == ContentSize
LineRune = Glyphs.VLine;
break;

View File

@@ -256,7 +256,7 @@ public class MenuBar : View
X = 0;
Y = 0;
Width = Dim.Fill ();
Height = 1;
Height = 1; // BUGBUG: Views should avoid setting Height as doing so implies Frame.Size == ContentSize
Menus = new MenuBarItem [] { };
//CanFocus = true;

View File

@@ -28,8 +28,8 @@ public class SpinnerView : View
/// <summary>Creates a new instance of the <see cref="SpinnerView"/> class.</summary>
public SpinnerView ()
{
Width = 1;
Height = 1;
Width = 1; // BUGBUG: Views should avoid setting Height as doing so implies Frame.Size == ContentSize
Height = 1; // BUGBUG: Views should avoid setting Height as doing so implies Frame.Size == ContentSize
_delay = DEFAULT_DELAY;
_bounce = false;
SpinReverse = false;

View File

@@ -93,7 +93,7 @@ public class StatusBar : View
X = 0;
Y = Pos.AnchorEnd (1);
Width = Dim.Fill ();
Height = 1;
Height = 1; // BUGBUG: Views should avoid setting Height as doing so implies Frame.Size == ContentSize
AddCommand (Command.Accept, InvokeItem);
}

View File

@@ -564,7 +564,7 @@ public class TabView : View
_host = host;
CanFocus = true;
Height = 1;
Height = 1; // BUGBUG: Views should avoid setting Height as doing so implies Frame.Size == ContentSize
Width = Dim.Fill ();
_rightScrollIndicator = new View

View File

@@ -1864,7 +1864,7 @@ public class TextField : View
// Don't let height > 1
if (Frame.Height > 1)
{
Height = 1;
Height = 1; // BUGBUG: Views should avoid setting Height as doing so implies Frame.Size == ContentSize
}
}
}

View File

@@ -397,7 +397,7 @@ namespace Terminal.Gui
/// </summary>
public TextValidateField ()
{
Height = 1;
Height = 1; // BUGBUG: Views should avoid setting Height as doing so implies Frame.Size == ContentSize
CanFocus = true;
// Things this view knows how to do

View File

@@ -2703,7 +2703,7 @@ public class TextView : View
//if (LayoutStyle == LayoutStyle.Computed) {
// LayoutStyle = LayoutStyle.Absolute;
//}
Height = 1;
Height = 1; // BUGBUG: Views should avoid setting Height as doing so implies Frame.Size == ContentSize
//LayoutStyle = prevLayoutStyle;
if (!IsInitialized)