]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/combocmn.cpp
add a note about changing selection background colour
[wxWidgets.git] / src / common / combocmn.cpp
index f47619998ea5541fdafc8f0544e9a0452941b9bd..2595b6ad92ace1787abfa67ff16d40f82bb3fa68 100644 (file)
@@ -28,6 +28,7 @@
 #include "wx/combobox.h"
 
 #ifndef WX_PRECOMP
+    #include "wx/app.h"
     #include "wx/log.h"
     #include "wx/dcclient.h"
     #include "wx/settings.h"
@@ -1854,7 +1855,7 @@ void wxComboCtrlBase::ShowPopup()
     }
 
     winPopup->Enable();
-    
+
     wxASSERT( !m_popup || m_popup == popup ); // Consistency check.
 
     wxSize adjustedSize = m_popupInterface->GetAdjustedSize(widthPopup,
@@ -1881,6 +1882,10 @@ void wxComboCtrlBase::ShowPopup()
 
     int rightX = scrPos.x + ctrlSz.x + m_extRight - szp.x;
     int leftX = scrPos.x - m_extLeft;
+
+    if ( wxTheApp->GetLayoutDirection() == wxLayout_RightToLeft )
+        leftX -= ctrlSz.x;
+
     int screenWidth = wxSystemSettings::GetMetric( wxSYS_SCREEN_X );
 
     // If there is not enough horizontal space, anchor on the other side.