Browse Source

Fixed FrameToScreen

Tig 1 year ago
parent
commit
ad411ce5eb
2 changed files with 2 additions and 3 deletions
  1. 1 1
      Terminal.Gui/View/Layout/ViewLayout.cs
  2. 1 2
      UnitTests/View/Layout/ToScreenTests.cs

+ 1 - 1
Terminal.Gui/View/Layout/ViewLayout.cs

@@ -103,7 +103,7 @@ public partial class View
                 var parentScreen = adornment.FrameToScreen ();
 
                 // Now add our Frame location
-                parentScreen.Offset (Frame.X, Frame.Y);
+                parentScreen.Offset (screen.X, screen.Y);
 
                 return parentScreen;
             }

+ 1 - 2
UnitTests/View/Layout/ToScreenTests.cs

@@ -150,13 +150,12 @@ public class ToScreenTests (ITestOutputHelper output)
             Y = 0,
             Width = 1,
             Height = 1,
-            BorderStyle = LineStyle.Single
         };
 
         var subviewOfSubview = new View ()
         {
             Id = "subviewOfSubview",
-            X = 2, // screen should be 4 (the subviewOfAdornment location is 1, and offset from frame is 1)
+            X = 2, // screen should be 3 (the subviewOfAdornment location is 1)
             Y = 0,
             Width = 1,
             Height = 1