Driver.cs 1.0 KB

1234567891011121314151617181920212223242526272829
  1. namespace Terminal.Gui.Drivers;
  2. /// <summary>
  3. /// Provides driver-wide configuration settings.
  4. /// </summary>
  5. public static class Driver
  6. {
  7. private static bool _force16Colors = false; // Resources/config.json overrides
  8. /// <summary>
  9. /// Gets or sets whether drivers should use 16 colors instead of the default TrueColors.
  10. /// This is a process-wide setting that is read by each driver instance at construction time.
  11. /// </summary>
  12. /// <remarks>
  13. /// <para>
  14. /// This setting is read by driver instances when they are created. Changing this value after
  15. /// a driver has been initialized will not affect existing driver instances.
  16. /// </para>
  17. /// <para>
  18. /// Individual drivers may override this if they do not support TrueColor output.
  19. /// </para>
  20. /// </remarks>
  21. [ConfigurationProperty (Scope = typeof (SettingsScope), OmitClassName = false)]
  22. public static bool Force16Colors
  23. {
  24. get => _force16Colors;
  25. set => _force16Colors = value;
  26. }
  27. }