Selaa lähdekoodia

fix shadow ensuring the window frame and avalonia standard container are both resized.

Dan Walmsley 4 vuotta sitten
vanhempi
sitoutus
a0a039860c
1 muutettua tiedostoa jossa 2 lisäystä ja 5 poistoa
  1. 2 5
      native/Avalonia.Native/src/OSX/window.mm

+ 2 - 5
native/Avalonia.Native/src/OSX/window.mm

@@ -263,13 +263,9 @@ public:
                 BaseEvents->Resized(AvnSize{x,y});
             }
             
+            [StandardContainer setFrameSize:NSSize{x,y}];
             [Window setContentSize:NSSize{x, y}];
             
-            
-            // Forces the shadow to invalidate on resize.
-            [Window setContentView: nullptr];
-            [Window setContentView: StandardContainer];
-            
             return S_OK;
         }
     }
@@ -2250,6 +2246,7 @@ protected:
         {
             if (Window != nullptr)
             {
+                [StandardContainer setFrameSize:NSSize{x,y}];
                 [Window setContentSize:NSSize{x, y}];
             
                 [Window setFrameTopLeftPoint:ToNSPoint(ConvertPointY(lastPositionSet))];