]> git.saurik.com Git - wxWidgets.git/commitdiff
[ 1508778 ] Fix for wxOwnerDrawnComboBox list selection rendering.
authorWłodzimierz Skiba <abx@abx.art.pl>
Mon, 19 Jun 2006 21:14:19 +0000 (21:14 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Mon, 19 Jun 2006 21:14:19 +0000 (21:14 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/combocmn.cpp
src/msw/combo.cpp

index 503005d9f65377ae0f7c84c658999358b1347e5e..ebac08be3fdc1768ca1445aff2d7c6e1b54f22da 100644 (file)
@@ -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;
 
index c51a4bc77e3d5645d078b28ab367f8f878962c59..401dc1033d282bd915cdca92743062afe770dfbe 100644 (file)
@@ -298,8 +298,14 @@ void wxComboCtrl::DrawFocusBackground( wxDC& dc, const wxRect& rect, int flags )
     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);
 
     if ( hTheme )
         theme = wxUxThemeEngine::GetIfActive();