]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/combocmn.cpp
Include wx/gdiobj.h according to precompiled headers of wx/wx.h (with other minor...
[wxWidgets.git] / src / common / combocmn.cpp
index 36a3bbe91acd90c38212717fee75c29be7e72501..ebac08be3fdc1768ca1445aff2d7c6e1b54f22da 100644 (file)
@@ -1092,7 +1092,7 @@ void wxComboCtrlBase::DoSetToolTip(wxToolTip *tooltip)
 // ----------------------------------------------------------------------------
 
 // draw focus background on area in a way typical on platform
-void wxComboCtrlBase::DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags )
+void wxComboCtrlBase::DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags ) const
 {
     wxSize sz = GetClientSize();
     bool isEnabled;
@@ -1126,8 +1126,14 @@ void wxComboCtrlBase::DrawFocusBackground( wxDC& dc, const wxRect& rect, int fla
     wxRect selRect(rect);
     selRect.y += focusSpacingY;
     selRect.height -= (focusSpacingY*2);
-    selRect.x += m_widthCustomPaint + focusSpacingX;
-    selRect.width -= m_widthCustomPaint + (focusSpacingX*2);
+
+    int wcp = 0;
+
+    if ( !(flags & wxCONTROL_ISSUBMENU) )
+        wcp += m_widthCustomPaint;
+
+    selRect.x += wcp + focusSpacingX;
+    selRect.width -= wcp + (focusSpacingX*2);
 
     wxColour bgCol;
 
@@ -1559,7 +1565,7 @@ void wxComboCtrlBase::DestroyPopup()
     m_popup = (wxWindow*) NULL;
 }
 
-void wxComboCtrlBase::SetPopupControl( wxComboPopup* iface )
+void wxComboCtrlBase::DoSetPopupControl(wxComboPopup* iface)
 {
     wxCHECK_RET( iface, wxT("no popup interface set for wxComboCtrl") );