mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user