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:
@@ -354,7 +354,9 @@ void wxWindowBase::Centre(int direction)
|
|||||||
yNew += posParent.y;
|
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
|
// fits the window around the children
|
||||||
|
Reference in New Issue
Block a user