]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/ownerdrw.cpp
fix typo in drawing slider ticks; added assert to check for it (slightly modified...
[wxWidgets.git] / src / os2 / ownerdrw.cpp
index 5e156318e31661d7b84a74f729b0425ff590424f..2cfddaec1b1460cf80aa24e07c426a1032144113 100644 (file)
@@ -18,7 +18,7 @@
 
 #ifndef WX_PRECOMP
   #include "wx/window.h"
-  #include "wx/msw/private.h"
+  #include "wx/os2/private.h"
   #include "wx/font.h"
   #include "wx/bitmap.h"
   #include "wx/dcmemory.h"
@@ -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};