Centre() centers the window centre and not the upper left corner

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4517 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-11-12 14:55:37 +00:00
parent 423a556f53
commit 772507f1f4

View File

@@ -354,7 +354,9 @@ void wxWindowBase::Centre(int direction)
yNew += posParent.y;
}
Move(xNew, yNew);
// move the centre of this window to this position (not the upper left
// corner as it was done before)
Move(xNew - width / 2, yNew - height / 2);
}
// fits the window around the children