Fixes #2465 - Simplify/Enforce LayoutStyle.Absolute when X, Y, Width, and/or Height are null or Absolute() (#2467)

* Merged v2_develop; updated API docs

* Code cleanup

* Fixed code that was using Dim/Pos before IsInit

* Fixed ComboBox using Bounds before IsInitalized and grabbing focus when it shouldn't

* Fixed ComboBox tests. Fixed FileDialog

* Fixed all !IsInitalized warnings

* Fixed AllviewsTester

* Fixed CharMap scenario

* Fixed ColorPicker (hack)

* Fixed CoputedLayout and Csv Editor

* Imrpoved warning

* Fixed more warnings

* Fixed GetTextFormatterSizeNeededForTextAndHotKey

* Fixed AllViewsTester

* AllViewsTester code cleanup

* AllViewsTester code cleanup

* AllViewsTester fixed for realz

* Decided Fill was better than Percent for default
This commit is contained in:
Tig
2024-01-04 10:40:47 -07:00
committed by GitHub
parent 3b394c8104
commit bc41d9bc09
32 changed files with 3734 additions and 3718 deletions

View File

@@ -19,6 +19,7 @@ namespace Terminal.Gui.ViewsTests {
var cb = new ComboBox ();
cb.BeginInit ();
cb.EndInit ();
cb.LayoutSubviews ();
Assert.Equal (string.Empty, cb.Text);
Assert.Null (cb.Source);
Assert.False (cb.AutoSize);
@@ -28,6 +29,7 @@ namespace Terminal.Gui.ViewsTests {
cb = new ComboBox ("Test");
cb.BeginInit ();
cb.EndInit ();
cb.LayoutSubviews ();
Assert.Equal ("Test", cb.Text);
Assert.Null (cb.Source);
Assert.False (cb.AutoSize);
@@ -37,6 +39,7 @@ namespace Terminal.Gui.ViewsTests {
cb = new ComboBox (new Rect (1, 2, 10, 20), new List<string> () { "One", "Two", "Three" });
cb.BeginInit ();
cb.EndInit ();
cb.LayoutSubviews ();
Assert.Equal (string.Empty, cb.Text);
Assert.NotNull (cb.Source);
Assert.False (cb.AutoSize);
@@ -46,6 +49,7 @@ namespace Terminal.Gui.ViewsTests {
cb = new ComboBox (new List<string> () { "One", "Two", "Three" });
cb.BeginInit ();
cb.EndInit ();
cb.LayoutSubviews ();
Assert.Equal (string.Empty, cb.Text);
Assert.NotNull (cb.Source);
Assert.False (cb.AutoSize);
@@ -60,6 +64,9 @@ namespace Terminal.Gui.ViewsTests {
var cb = new ComboBox (new List<string> () { "One", "Two", "Three" }) {
SelectedItem = 1
};
cb.BeginInit ();
cb.EndInit ();
cb.LayoutSubviews ();
Assert.Equal ("Two", cb.Text);
Assert.NotNull (cb.Source);
Assert.False (cb.AutoSize);