X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7c74e7fe1de14f32dcd6f3c9cdd727de540bbd0e..0470b1e6fe7a49bb87756006ef9fc232e3dbaaf8:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index a9f702acfd..9cad968ed4 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -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