diff --git a/Terminal.Gui/Text/TextFormatter.cs b/Terminal.Gui/Text/TextFormatter.cs index 95b317038..174d9e89e 100644 --- a/Terminal.Gui/Text/TextFormatter.cs +++ b/Terminal.Gui/Text/TextFormatter.cs @@ -34,7 +34,7 @@ public class TextFormatter /// When true, the Draw method will use the new separated formatter/renderer architecture. /// This provides better performance and addresses Format/Draw coupling issues. /// - public bool UseNewArchitecture { get; set; } = false; + public bool UseNewArchitecture { get; set; } = true; /// /// Initializes a new instance of the class. diff --git a/Tests/UnitTestsParallelizable/Text/TextFormatterNewArchitectureTests.cs b/Tests/UnitTestsParallelizable/Text/TextFormatterNewArchitectureTests.cs index c902c343c..e5fc765e3 100644 --- a/Tests/UnitTestsParallelizable/Text/TextFormatterNewArchitectureTests.cs +++ b/Tests/UnitTestsParallelizable/Text/TextFormatterNewArchitectureTests.cs @@ -150,17 +150,17 @@ public class TextFormatterNewArchitectureTests } [Fact] - public void TextFormatter_UseNewArchitecture_Flag_Works() + public void TextFormatter_UseNewArchitecture_Flag_DefaultsToTrue() { Application.Init(new FakeDriver()); var tf = new TextFormatter { - Text = "Hello World", - UseNewArchitecture = true // Enable new architecture + Text = "Hello World" + // UseNewArchitecture defaults to true now }; - // This should now use the new architecture via the Draw method + // This should use the new architecture by default tf.Draw(new Rectangle(0, 0, 10, 1), Attribute.Default, Attribute.Default); // Test that the new architecture produces results @@ -168,6 +168,9 @@ public class TextFormatterNewArchitectureTests Assert.True(size.Width > 0); Assert.True(size.Height > 0); + // Verify default is true + Assert.True(tf.UseNewArchitecture); + Application.Shutdown(); } } \ No newline at end of file