diff --git a/Examples/UICatalog/Scenarios/ColorPicker.cs b/Examples/UICatalog/Scenarios/ColorPicker.cs index a058af4af..9d03aabdf 100644 --- a/Examples/UICatalog/Scenarios/ColorPicker.cs +++ b/Examples/UICatalog/Scenarios/ColorPicker.cs @@ -186,11 +186,11 @@ public class ColorPickers : Scenario { X = Pos.Right (cbSupportsTrueColor) + 1, Y = Pos.Top (lblDriverName), - CheckedState = Application.Force16Colors ? CheckState.Checked : CheckState.UnChecked, + CheckedState = Terminal.Gui.Drivers.Driver.Force16Colors ? CheckState.Checked : CheckState.UnChecked, Enabled = canTrueColor, Text = "Force16Colors" }; - cbUseTrueColor.CheckedStateChanging += (_, evt) => { Application.Force16Colors = evt.Result == CheckState.Checked; }; + cbUseTrueColor.CheckedStateChanging += (_, evt) => { Terminal.Gui.Drivers.Driver.Force16Colors = evt.Result == CheckState.Checked; }; app.Add (lblDriverName, cbSupportsTrueColor, cbUseTrueColor); // Set default colors. diff --git a/Examples/UICatalog/Scenarios/Images.cs b/Examples/UICatalog/Scenarios/Images.cs index 5a5d2a7d7..70b16e65c 100644 --- a/Examples/UICatalog/Scenarios/Images.cs +++ b/Examples/UICatalog/Scenarios/Images.cs @@ -122,11 +122,11 @@ public class Images : Scenario { X = Pos.Right (cbSupportsTrueColor) + 2, Y = 0, - CheckedState = !Application.Force16Colors ? CheckState.Checked : CheckState.UnChecked, + CheckedState = !Terminal.Gui.Drivers.Driver.Force16Colors ? CheckState.Checked : CheckState.UnChecked, Enabled = canTrueColor, Text = "Use true color" }; - cbUseTrueColor.CheckedStateChanging += (_, evt) => Application.Force16Colors = evt.Result == CheckState.UnChecked; + cbUseTrueColor.CheckedStateChanging += (_, evt) => Terminal.Gui.Drivers.Driver.Force16Colors = evt.Result == CheckState.UnChecked; _win.Add (cbUseTrueColor); var btnOpenImage = new Button { X = Pos.Right (cbUseTrueColor) + 2, Y = 0, Text = "Open Image" }; diff --git a/Examples/UICatalog/Scenarios/LineDrawing.cs b/Examples/UICatalog/Scenarios/LineDrawing.cs index e8608c051..1f924dbec 100644 --- a/Examples/UICatalog/Scenarios/LineDrawing.cs +++ b/Examples/UICatalog/Scenarios/LineDrawing.cs @@ -133,14 +133,14 @@ public class LineDrawing : Scenario var d = new Dialog { Title = title, - Width = Application.Force16Colors ? 35 : Dim.Auto (DimAutoStyle.Auto, Dim.Percent (80), Dim.Percent (90)), + Width = Terminal.Gui.Drivers.Driver.Force16Colors ? 35 : Dim.Auto (DimAutoStyle.Auto, Dim.Percent (80), Dim.Percent (90)), Height = 10 }; var btnOk = new Button { X = Pos.Center () - 5, - Y = Application.Force16Colors ? 6 : 4, + Y = Terminal.Gui.Drivers.Driver.Force16Colors ? 6 : 4, Text = "Ok", Width = Dim.Auto (), IsDefault = true @@ -174,7 +174,7 @@ public class LineDrawing : Scenario d.AddButton (btnCancel); View cp; - if (Application.Force16Colors) + if (Terminal.Gui.Drivers.Driver.Force16Colors) { cp = new ColorPicker16 { @@ -197,7 +197,7 @@ public class LineDrawing : Scenario Application.Run (d); d.Dispose (); - newColor = Application.Force16Colors ? ((ColorPicker16)cp).SelectedColor : ((ColorPicker)cp).SelectedColor; + newColor = Terminal.Gui.Drivers.Driver.Force16Colors ? ((ColorPicker16)cp).SelectedColor : ((ColorPicker)cp).SelectedColor; return accept; } diff --git a/Examples/UICatalog/UICatalogRunnable.cs b/Examples/UICatalog/UICatalogRunnable.cs index 997bb9236..52f4bb6a6 100644 --- a/Examples/UICatalog/UICatalogRunnable.cs +++ b/Examples/UICatalog/UICatalogRunnable.cs @@ -176,7 +176,7 @@ public class UICatalogRunnable : Runnable _force16ColorsMenuItemCb = new () { Title = "Force _16 Colors", - CheckedState = Application.Force16Colors ? CheckState.Checked : CheckState.UnChecked, + CheckedState = Terminal.Gui.Drivers.Driver.Force16Colors ? CheckState.Checked : CheckState.UnChecked, // Best practice for CheckBoxes in menus is to disable focus and highlight states CanFocus = false, HighlightStates = MouseState.None @@ -184,7 +184,7 @@ public class UICatalogRunnable : Runnable _force16ColorsMenuItemCb.CheckedStateChanging += (sender, args) => { - if (Application.Force16Colors + if (Terminal.Gui.Drivers.Driver.Force16Colors && args.Result == CheckState.UnChecked && !Application.Driver!.SupportsTrueColor) { @@ -194,7 +194,7 @@ public class UICatalogRunnable : Runnable _force16ColorsMenuItemCb.CheckedStateChanged += (sender, args) => { - Application.Force16Colors = args.Value == CheckState.Checked; + Terminal.Gui.Drivers.Driver.Force16Colors = args.Value == CheckState.Checked; _force16ColorsShortcutCb!.CheckedState = args.Value; Application.LayoutAndDraw (); @@ -646,13 +646,13 @@ public class UICatalogRunnable : Runnable _force16ColorsShortcutCb = new () { Title = "16 color mode", - CheckedState = Application.Force16Colors ? CheckState.Checked : CheckState.UnChecked, + CheckedState = Terminal.Gui.Drivers.Driver.Force16Colors ? CheckState.Checked : CheckState.UnChecked, CanFocus = false }; _force16ColorsShortcutCb.CheckedStateChanging += (sender, args) => { - if (Application.Force16Colors + if (Terminal.Gui.Drivers.Driver.Force16Colors && args.Result == CheckState.UnChecked && !Application.Driver!.SupportsTrueColor) { @@ -663,7 +663,7 @@ public class UICatalogRunnable : Runnable _force16ColorsShortcutCb.CheckedStateChanged += (sender, args) => { - Application.Force16Colors = args.Value == CheckState.Checked; + Terminal.Gui.Drivers.Driver.Force16Colors = args.Value == CheckState.Checked; _force16ColorsMenuItemCb!.CheckedState = args.Value; Application.LayoutAndDraw (); }; @@ -714,7 +714,7 @@ public class UICatalogRunnable : Runnable } _disableMouseCb!.CheckedState = Application.IsMouseDisabled ? CheckState.Checked : CheckState.UnChecked; - _force16ColorsShortcutCb!.CheckedState = Application.Force16Colors ? CheckState.Checked : CheckState.UnChecked; + _force16ColorsShortcutCb!.CheckedState = Terminal.Gui.Drivers.Driver.Force16Colors ? CheckState.Checked : CheckState.UnChecked; Application.TopRunnableView?.SetNeedsDraw (); } diff --git a/Terminal.Gui/App/Application.Driver.cs b/Terminal.Gui/App/Application.Driver.cs index 427ba4de5..e7b56843d 100644 --- a/Terminal.Gui/App/Application.Driver.cs +++ b/Terminal.Gui/App/Application.Driver.cs @@ -13,25 +13,6 @@ public static partial class Application // Driver abstractions internal set => ApplicationImpl.Instance.Driver = value; } - private static bool _force16Colors = false; // Resources/config.json overrides - - /// - [ConfigurationProperty (Scope = typeof (SettingsScope))] - [Obsolete ("The legacy static Application object is going away.")] - public static bool Force16Colors - { - get => _force16Colors; - set - { - bool oldValue = _force16Colors; - _force16Colors = value; - Force16ColorsChanged?.Invoke (null, new ValueChangedEventArgs (oldValue, _force16Colors)); - } - } - - /// Raised when changes. - public static event EventHandler>? Force16ColorsChanged; - private static string _forceDriver = string.Empty; // Resources/config.json overrides /// diff --git a/Terminal.Gui/App/ApplicationImpl.Driver.cs b/Terminal.Gui/App/ApplicationImpl.Driver.cs index 11fabb91a..f19f2f527 100644 --- a/Terminal.Gui/App/ApplicationImpl.Driver.cs +++ b/Terminal.Gui/App/ApplicationImpl.Driver.cs @@ -8,10 +8,7 @@ internal partial class ApplicationImpl public IDriver? Driver { get; set; } /// - public bool Force16Colors { get; set; } - - /// - public string ForceDriver { get; set; } = string.Empty; + public string ForceDriver { get; internal set; } = string.Empty; /// public List Sixel { get; } = new (); diff --git a/Terminal.Gui/App/ApplicationImpl.Lifecycle.cs b/Terminal.Gui/App/ApplicationImpl.Lifecycle.cs index 53691ea7b..cdf65043c 100644 --- a/Terminal.Gui/App/ApplicationImpl.Lifecycle.cs +++ b/Terminal.Gui/App/ApplicationImpl.Lifecycle.cs @@ -313,7 +313,7 @@ internal partial class ApplicationImpl // Note: ForceDriver and Force16Colors are reset // If they need to persist across Init/Shutdown cycles // then the user of the library should manage that state - Force16Colors = false; + Terminal.Gui.Drivers.Driver.Force16Colors = false; ForceDriver = string.Empty; // === 11. Reset synchronization context === @@ -365,8 +365,6 @@ internal partial class ApplicationImpl #endif // Event handlers for Application static property changes - private void OnForce16ColorsChanged (object? sender, ValueChangedEventArgs e) { Force16Colors = e.NewValue; } - private void OnForceDriverChanged (object? sender, ValueChangedEventArgs e) { ForceDriver = e.NewValue; } /// @@ -374,7 +372,6 @@ internal partial class ApplicationImpl /// private void UnsubscribeApplicationEvents () { - Application.Force16ColorsChanged -= OnForce16ColorsChanged; Application.ForceDriverChanged -= OnForceDriverChanged; } } diff --git a/Terminal.Gui/App/ApplicationImpl.cs b/Terminal.Gui/App/ApplicationImpl.cs index 9910e7019..08aefcab7 100644 --- a/Terminal.Gui/App/ApplicationImpl.cs +++ b/Terminal.Gui/App/ApplicationImpl.cs @@ -15,7 +15,6 @@ internal partial class ApplicationImpl : IApplication internal ApplicationImpl () { // Subscribe to Application static property change events - Application.Force16ColorsChanged += OnForce16ColorsChanged; Application.ForceDriverChanged += OnForceDriverChanged; } @@ -146,7 +145,7 @@ internal partial class ApplicationImpl : IApplication // Reset Application static properties to their defaults // This ensures tests start with clean state Application.ForceDriver = string.Empty; - Application.Force16Colors = false; + Drivers.Driver.Force16Colors = false; Application.IsMouseDisabled = false; Application.QuitKey = Key.Esc; Application.ArrangeKey = Key.F5.WithCtrl; diff --git a/Terminal.Gui/App/IApplication.cs b/Terminal.Gui/App/IApplication.cs index 9933ab178..06a1c2360 100644 --- a/Terminal.Gui/App/IApplication.cs +++ b/Terminal.Gui/App/IApplication.cs @@ -450,17 +450,10 @@ public interface IApplication : IDisposable IClipboard? Clipboard { get; } /// - /// Gets or sets whether will be forced to output only the 16 colors defined in - /// . The default is , meaning 24-bit (TrueColor) colors will be - /// output as long as the selected supports TrueColor. + /// Gets the name of the driver to force. One of "fake", "dotnet", "windows", or "unix". + /// If not specified, the driver is selected based on the platform. /// - bool Force16Colors { get; set; } - - /// - /// Forces the use of the specified driver (one of "fake", "dotnet", "windows", or "unix"). If not - /// specified, the driver is selected based on the platform. - /// - string ForceDriver { get; set; } + string ForceDriver { get; } /// /// Gets or location and size of the application in the terminal. By default, the location is (0, 0) and the size diff --git a/Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs b/Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs index 4f8ab1fc0..00db00144 100644 --- a/Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs +++ b/Terminal.Gui/Drivers/DotNetDriver/NetOutput.cs @@ -81,7 +81,7 @@ public class NetOutput : OutputBase, IOutput /// protected override void AppendOrWriteAttribute (StringBuilder output, Attribute attr, TextStyle redrawTextStyle) { - if (Application.Force16Colors) + if (Terminal.Gui.Drivers.Driver.Force16Colors) { output.Append (EscSeqUtils.CSI_SetForegroundColor (attr.Foreground.GetAnsiColorCode ())); output.Append (EscSeqUtils.CSI_SetBackgroundColor (attr.Background.GetAnsiColorCode ())); diff --git a/Terminal.Gui/Drivers/Driver.cs b/Terminal.Gui/Drivers/Driver.cs new file mode 100644 index 000000000..63cb20a07 --- /dev/null +++ b/Terminal.Gui/Drivers/Driver.cs @@ -0,0 +1,29 @@ +namespace Terminal.Gui.Drivers; + +/// +/// Provides driver-wide configuration settings. +/// +public static class Driver +{ + private static bool _force16Colors = false; // Resources/config.json overrides + + /// + /// Gets or sets whether drivers should use 16 colors instead of the default TrueColors. + /// This is a process-wide setting that is read by each driver instance at construction time. + /// + /// + /// + /// This setting is read by driver instances when they are created. Changing this value after + /// a driver has been initialized will not affect existing driver instances. + /// + /// + /// Individual drivers may override this if they do not support TrueColor output. + /// + /// + [ConfigurationProperty (Scope = typeof (SettingsScope), OmitClassName = false)] + public static bool Force16Colors + { + get => _force16Colors; + set => _force16Colors = value; + } +} diff --git a/Terminal.Gui/Drivers/DriverImpl.cs b/Terminal.Gui/Drivers/DriverImpl.cs index e4f238c34..1a921fecc 100644 --- a/Terminal.Gui/Drivers/DriverImpl.cs +++ b/Terminal.Gui/Drivers/DriverImpl.cs @@ -31,6 +31,7 @@ internal class DriverImpl : IDriver private readonly IOutput _output; private readonly AnsiRequestScheduler _ansiRequestScheduler; private CursorVisibility _lastCursor = CursorVisibility.Default; + private readonly bool _instanceForce16Colors; /// /// Initializes a new instance of the class. @@ -53,6 +54,9 @@ internal class DriverImpl : IDriver OutputBuffer = outputBuffer; _ansiRequestScheduler = ansiRequestScheduler; + // Read the static Force16Colors value at construction time and store in instance field + _instanceForce16Colors = Terminal.Gui.Drivers.Driver.Force16Colors; + InputProcessor.KeyDown += (s, e) => KeyDown?.Invoke (s, e); InputProcessor.KeyUp += (s, e) => KeyUp?.Invoke (s, e); @@ -202,13 +206,15 @@ internal class DriverImpl : IDriver public bool SupportsTrueColor => true; /// - - public bool Force16Colors + bool IDriver.Force16Colors { - get => Application.Force16Colors || !SupportsTrueColor; - set => Application.Force16Colors = value || !SupportsTrueColor; + get => _instanceForce16Colors || !SupportsTrueColor; + set => throw new InvalidOperationException ("Force16Colors is read-only per driver instance. Set Terminal.Gui.Drivers.Driver.Force16Colors static property before driver creation."); } + /// + public bool GetForce16Colors () => _instanceForce16Colors || !SupportsTrueColor; + /// public Attribute CurrentAttribute diff --git a/Terminal.Gui/Drivers/FakeDriver/FakeOutput.cs b/Terminal.Gui/Drivers/FakeDriver/FakeOutput.cs index 8fd790f19..84613fd82 100644 --- a/Terminal.Gui/Drivers/FakeDriver/FakeOutput.cs +++ b/Terminal.Gui/Drivers/FakeDriver/FakeOutput.cs @@ -86,7 +86,7 @@ public class FakeOutput : OutputBase, IOutput /// protected override void AppendOrWriteAttribute (StringBuilder output, Attribute attr, TextStyle redrawTextStyle) { - if (Application.Force16Colors) + if (Terminal.Gui.Drivers.Driver.Force16Colors) { output.Append (EscSeqUtils.CSI_SetForegroundColor (attr.Foreground.GetAnsiColorCode ())); output.Append (EscSeqUtils.CSI_SetBackgroundColor (attr.Background.GetAnsiColorCode ())); diff --git a/Terminal.Gui/Drivers/IDriver.cs b/Terminal.Gui/Drivers/IDriver.cs index 5e677140d..26ec56a7e 100644 --- a/Terminal.Gui/Drivers/IDriver.cs +++ b/Terminal.Gui/Drivers/IDriver.cs @@ -84,8 +84,9 @@ public interface IDriver bool SupportsTrueColor { get; } /// - /// Gets or sets whether the should use 16 colors instead of the default TrueColors. - /// See to change this setting via . + /// Gets whether the should use 16 colors instead of the default TrueColors. + /// This value is set at driver construction time from the static Terminal.Gui.Drivers.Driver.Force16Colors property. + /// Use to retrieve this value. /// /// /// @@ -95,6 +96,14 @@ public interface IDriver /// bool Force16Colors { get; set; } + /// + /// Gets whether the is using 16 colors instead of TrueColors. + /// + /// + /// if the driver is using 16 colors; otherwise, . + /// + bool GetForce16Colors (); + /// /// The that will be used for the next or /// diff --git a/Terminal.Gui/Drivers/UnixDriver/UnixOutput.cs b/Terminal.Gui/Drivers/UnixDriver/UnixOutput.cs index dfbf63ead..2d0cad1bb 100644 --- a/Terminal.Gui/Drivers/UnixDriver/UnixOutput.cs +++ b/Terminal.Gui/Drivers/UnixDriver/UnixOutput.cs @@ -39,7 +39,7 @@ internal class UnixOutput : OutputBase, IOutput /// protected override void AppendOrWriteAttribute (StringBuilder output, Attribute attr, TextStyle redrawTextStyle) { - if (Application.Force16Colors) + if (Terminal.Gui.Drivers.Driver.Force16Colors) { output.Append (EscSeqUtils.CSI_SetForegroundColor (attr.Foreground.GetAnsiColorCode ())); output.Append (EscSeqUtils.CSI_SetBackgroundColor (attr.Background.GetAnsiColorCode ())); diff --git a/Terminal.Gui/Views/Color/ColorPicker.Prompt.cs b/Terminal.Gui/Views/Color/ColorPicker.Prompt.cs index 907305471..6be3813ba 100644 --- a/Terminal.Gui/Views/Color/ColorPicker.Prompt.cs +++ b/Terminal.Gui/Views/Color/ColorPicker.Prompt.cs @@ -1,5 +1,7 @@ #nullable disable  +using DriverConfig = Terminal.Gui.Drivers.Driver; + namespace Terminal.Gui.Views; public partial class ColorPicker @@ -21,14 +23,14 @@ public partial class ColorPicker var d = new Dialog { Title = title, - Width = Application.Force16Colors ? 37 : Dim.Auto (DimAutoStyle.Auto, Dim.Percent (80), Dim.Percent (90)), + Width = DriverConfig.Force16Colors ? 37 : Dim.Auto (DimAutoStyle.Auto, Dim.Percent (80), Dim.Percent (90)), Height = 20 }; var btnOk = new Button { X = Pos.Center () - 5, - Y = Application.Force16Colors ? 6 : 4, + Y = DriverConfig.Force16Colors ? 6 : 4, Text = "Ok", Width = Dim.Auto (), IsDefault = true @@ -63,7 +65,7 @@ public partial class ColorPicker View cpForeground; - if (Application.Force16Colors) + if (DriverConfig.Force16Colors) { cpForeground = new ColorPicker16 { @@ -88,7 +90,7 @@ public partial class ColorPicker View cpBackground; - if (Application.Force16Colors) + if (DriverConfig.Force16Colors) { cpBackground = new ColorPicker16 { @@ -117,8 +119,8 @@ public partial class ColorPicker app.Run (d); d.Dispose (); - Color newForeColor = Application.Force16Colors ? ((ColorPicker16)cpForeground).SelectedColor : ((ColorPicker)cpForeground).SelectedColor; - Color newBackColor = Application.Force16Colors ? ((ColorPicker16)cpBackground).SelectedColor : ((ColorPicker)cpBackground).SelectedColor; + Color newForeColor = DriverConfig.Force16Colors ? ((ColorPicker16)cpForeground).SelectedColor : ((ColorPicker)cpForeground).SelectedColor; + Color newBackColor = DriverConfig.Force16Colors ? ((ColorPicker16)cpBackground).SelectedColor : ((ColorPicker)cpBackground).SelectedColor; newAttribute = new (newForeColor, newBackColor); app.Dispose (); return accept; diff --git a/Terminal.Gui/Views/Shortcut.cs b/Terminal.Gui/Views/Shortcut.cs index 65d24ea8b..a70a40a4e 100644 --- a/Terminal.Gui/Views/Shortcut.cs +++ b/Terminal.Gui/Views/Shortcut.cs @@ -391,7 +391,7 @@ public class Shortcut : View, IOrientation, IDesignable /// /// /// This example illustrates how to add a to a that toggles the - /// property. + /// property. /// /// /// var force16ColorsShortcut = new Shortcut @@ -401,12 +401,12 @@ public class Shortcut : View, IOrientation, IDesignable /// CommandView = new CheckBox { Text = "Force 16 Colors" } /// }; /// var cb = force16ColorsShortcut.CommandView as CheckBox; - /// cb.Checked = Application.Force16Colors; + /// cb.Checked = Terminal.Gui.Drivers.Driver.Force16Colors; /// /// cb.Toggled += (s, e) => /// { /// var cb = s as CheckBox; - /// Application.Force16Colors = cb!.Checked == true; + /// Terminal.Gui.Drivers.Driver.Force16Colors = cb!.Checked == true; /// Application.Refresh(); /// }; /// StatusBar.Add(force16ColorsShortcut); diff --git a/Tests/UnitTestsParallelizable/Application/ApplicationTests.cs b/Tests/UnitTestsParallelizable/Application/ApplicationTests.cs index e28381940..810a18837 100644 --- a/Tests/UnitTestsParallelizable/Application/ApplicationTests.cs +++ b/Tests/UnitTestsParallelizable/Application/ApplicationTests.cs @@ -132,7 +132,7 @@ public class ApplicationTests (ITestOutputHelper output) { using IApplication app = Application.Create (); - app.ForceDriver = "fake"; + Application.ForceDriver = "fake"; // Note: Init() without params picks up driver configuration app.Init (); diff --git a/Tests/UnitTestsParallelizable/Drivers/ToAnsiTests.cs b/Tests/UnitTestsParallelizable/Drivers/ToAnsiTests.cs index 7db07eeca..c6d009e48 100644 --- a/Tests/UnitTestsParallelizable/Drivers/ToAnsiTests.cs +++ b/Tests/UnitTestsParallelizable/Drivers/ToAnsiTests.cs @@ -73,7 +73,7 @@ public class ToAnsiTests : FakeDriverBase public void ToAnsi_With_Background_Colors (bool force16Colors, string expected) { IDriver driver = CreateFakeDriver (10, 2); - Application.Force16Colors = force16Colors; + Terminal.Gui.Drivers.Driver.Force16Colors = force16Colors; // Set background color driver.CurrentAttribute = new (Color.White, Color.Red); @@ -210,7 +210,7 @@ public class ToAnsiTests : FakeDriverBase IDriver driver = CreateFakeDriver (10, 1); // Use RGB colors (when not forcing 16 colors) - Application.Force16Colors = false; + Terminal.Gui.Drivers.Driver.Force16Colors = false; try { driver.CurrentAttribute = new Attribute (new Color (255, 0, 0), new Color (0, 255, 0)); @@ -224,7 +224,7 @@ public class ToAnsiTests : FakeDriverBase } finally { - Application.Force16Colors = true; // Reset + Terminal.Gui.Drivers.Driver.Force16Colors = true; // Reset } } @@ -234,7 +234,7 @@ public class ToAnsiTests : FakeDriverBase IDriver driver = CreateFakeDriver (10, 1); // Force 16 colors - Application.Force16Colors = true; + Terminal.Gui.Drivers.Driver.Force16Colors = true; driver.CurrentAttribute = new Attribute (Color.Red, Color.Blue); driver.AddStr ("16Color"); diff --git a/Tests/UnitTestsParallelizable/TestSetup.cs b/Tests/UnitTestsParallelizable/TestSetup.cs index a1f79c587..b6a1f6894 100644 --- a/Tests/UnitTestsParallelizable/TestSetup.cs +++ b/Tests/UnitTestsParallelizable/TestSetup.cs @@ -44,8 +44,8 @@ public class GlobalTestSetup : IDisposable //// Don't check Application.ForceDriver //Assert.Empty (Application.ForceDriver); - //// Don't check Application.Force16Colors - ////Assert.False (Application.Force16Colors); + //// Don't check Terminal.Gui.Drivers.Driver.Force16Colors + ////Assert.False (Terminal.Gui.Drivers.Driver.Force16Colors); //Assert.Null (Application.Driver); //Assert.False (Application.StopAfterFirstIteration); Assert.Equal (Key.Tab.WithShift, Application.PrevTabKey);