Browse Source

Move local function to end of method

Brandon Thetford 1 year ago
parent
commit
4843488bc0
1 changed files with 23 additions and 23 deletions
  1. 23 23
      Terminal.Gui/Application.cs

+ 23 - 23
Terminal.Gui/Application.cs

@@ -1490,29 +1490,6 @@ public static partial class Application
             }
         }
 
-        bool AdornmentHandledMouseEvent (Adornment frame)
-        {
-            if (frame?.Thickness.Contains (frame.FrameToScreen (), a.MouseEvent.X, a.MouseEvent.Y) ?? false)
-            {
-                Point boundsPoint = frame.ScreenToBounds (a.MouseEvent.X, a.MouseEvent.Y);
-
-                var me = new MouseEvent
-                {
-                    X = boundsPoint.X,
-                    Y = boundsPoint.Y,
-                    Flags = a.MouseEvent.Flags,
-                    OfX = boundsPoint.X,
-                    OfY = boundsPoint.Y,
-                    View = frame
-                };
-                frame.OnMouseEvent (me);
-
-                return true;
-            }
-
-            return false;
-        }
-
         if (view is { })
         {
             // Work inside-out (Padding, Border, Margin)
@@ -1622,6 +1599,29 @@ public static partial class Application
 
         return;
 
+        bool AdornmentHandledMouseEvent (Adornment frame)
+        {
+            if (frame?.Thickness.Contains (frame.FrameToScreen (), a.MouseEvent.X, a.MouseEvent.Y) ?? false)
+            {
+                Point boundsPoint = frame.ScreenToBounds (a.MouseEvent.X, a.MouseEvent.Y);
+
+                var me = new MouseEvent
+                {
+                    X = boundsPoint.X,
+                    Y = boundsPoint.Y,
+                    Flags = a.MouseEvent.Flags,
+                    OfX = boundsPoint.X,
+                    OfY = boundsPoint.Y,
+                    View = frame
+                };
+                frame.OnMouseEvent (me);
+
+                return true;
+            }
+
+            return false;
+        }
+
         static bool OutsideRect (Point p, Rectangle r) { return p.X < 0 || p.X > r.Right || p.Y < 0 || p.Y > r.Bottom; }
     }
     #nullable restore