浏览代码

Show it in action

Brandon Thetford 1 年之前
父节点
当前提交
bb5a538f1d
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 1 1
      Terminal.Gui/View/Adornment/Adornment.cs
  2. 3 0
      Terminal.Gui/View/ViewDiagnostics.cs

+ 1 - 1
Terminal.Gui/View/Adornment/Adornment.cs

@@ -244,7 +244,7 @@ public class Adornment : View
     protected internal override bool OnMouseLeave (MouseEvent mouseEvent)
     {
         // Invert Normal
-        if (Diagnostics.HasFlag (ViewDiagnosticFlags.MouseEnter) && ColorScheme != null)
+        if (Diagnostics.FastHasFlags (ViewDiagnosticFlags.MouseEnter) && ColorScheme != null)
         {
             var cs = new ColorScheme (ColorScheme)
             {

+ 3 - 0
Terminal.Gui/View/ViewDiagnostics.cs

@@ -1,8 +1,11 @@
 
+using Terminal.Gui.Analyzers.Internal.Attributes;
+
 namespace Terminal.Gui;
 
 /// <summary>Enables diagnostic functions for <see cref="View"/>.</summary>
 [Flags]
+[GenerateEnumExtensionMethods(FastHasFlags = true)]
 public enum ViewDiagnosticFlags : uint
 {
     /// <summary>All diagnostics off</summary>