瀏覽代碼

Dock should update it's clip since it manages itself

Jean-David Moisan 1 年之前
父節點
當前提交
47d4b1d0f0
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      Source/Dock.cs

+ 4 - 0
Source/Dock.cs

@@ -32,6 +32,10 @@ namespace Apos.Gui {
             X = DockLeft;
             X = DockLeft;
             Y = DockTop;
             Y = DockTop;
 
 
+            if (Parent != null) {
+                Clip = Bounds.Intersection(Parent.Clip);
+            }
+
             if (Child != null) {
             if (Child != null) {
                 Child.X = X;
                 Child.X = X;
                 Child.Y = Y;
                 Child.Y = Y;