X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3260bce473ab247edd8ca1d3aee4eb648b4b97e..61ecf6d34ffb087e4a02d1c4e29e1f155875eba0:/src/os2/ownerdrw.cpp diff --git a/src/os2/ownerdrw.cpp b/src/os2/ownerdrw.cpp index 5e156318e3..2cfddaec1b 100644 --- a/src/os2/ownerdrw.cpp +++ b/src/os2/ownerdrw.cpp @@ -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};