]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/ownerdrw.cpp
fix for wxComboBox flicker on create (patch 598891)
[wxWidgets.git] / src / os2 / ownerdrw.cpp
index 75c8906036d2a42525d99b9aacd081ffc5533bb8..9e9dd6568ded9ffd6356b58ed6f7e8dd715f9ad2 100644 (file)
@@ -365,11 +365,10 @@ bool wxOwnerDrawn::OnDrawItem(
             //
             wxASSERT((nBmpWidth <= rRect.width) && (nBmpHeight <= rRect.height));
 
-            //
-            //MT: blit with mask enabled.
-            //
+            int                     nHeightDiff = m_nHeight - nBmpHeight;
+
             rDC.Blit( rRect.x + (GetMarginWidth() - nBmpWidth) / 2
-                     ,rRect.y + (m_nHeight - nBmpHeight) /2
+                     ,rRect.y + nHeightDiff / 2
                      ,nBmpWidth
                      ,nBmpHeight
                      ,&vDCMem
@@ -383,8 +382,8 @@ bool wxOwnerDrawn::OnDrawItem(
             {
                 RECT                vRectBmp = { rRect.x
                                                 ,rRect.y
-                                                ,rRect.x + GetMarginWidth()
-                                                ,rRect.y + m_nHeight
+                                                ,rRect.x + GetMarginWidth() - 1
+                                                ,rRect.y + m_nHeight - 1
                                                };
                 POINTL              vPnt1 = {rRect.x + 1, rRect.y + 3}; // Leave a little background border
                 POINTL              vPnt2 = {rRect.x + GetMarginWidth(), rRect.y + m_nHeight - 3};
@@ -399,7 +398,6 @@ bool wxOwnerDrawn::OnDrawItem(
                               ,&vLine
                              );
                 ::GpiMove(hPS, &vPnt1);
-                char   zMsg[128];
                 ::GpiBox( hPS
                          ,DRO_OUTLINE
                          ,&vPnt2