fix for popup positioning in RTL mode (patch 1622930)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-01-07 16:07:59 +00:00
parent a2dc658bba
commit d2aa263fd1

View File

@@ -151,7 +151,18 @@ void wxPopupWindowBase::Position(const wxPoint& ptOrigin,
}
// now check left/right too
wxCoord x = ptOrigin.x + size.x;
wxCoord x = ptOrigin.x;
if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft )
{
// shift the window to the left instead of the right.
x -= size.x;
x -= sizeSelf.x; // also shift it by window width.
}
else
x += size.x;
if ( x + sizeSelf.x > sizeScreen.x )
{
// check if there is enough space to the left