浏览代码

Centering fix on LayoutVerticalCenter

Jean-David Moisan 6 年之前
父节点
当前提交
2180d457f8
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Source/LayoutVerticalCenter.cs

+ 2 - 2
Source/LayoutVerticalCenter.cs

@@ -34,8 +34,8 @@ namespace Apos.Gui {
             }
 
             Point position = Panel.Position;
-            int halfWidth = _newWidth / 2;
-            int halfHeight = _newHeight / 2;
+            int halfWidth = Panel.Width / 2;
+            int halfHeight = Panel.Height / 2;
 
             int canvasWidth = 0;
             int canvasHeight = 0;