X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad7f3189f3240efe5f374516ffa7a0ae70700286..088117622c38b0cef9ab634ebc0987b839572e74:/src/os2/ownerdrw.cpp diff --git a/src/os2/ownerdrw.cpp b/src/os2/ownerdrw.cpp index e5c4065ef4..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,11 +382,12 @@ 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 = {2, 4}; // Leave a little background border + POINTL vPnt1 = {rRect.x + 1, rRect.y + 3}; // Leave a little background border POINTL vPnt2 = {rRect.x + GetMarginWidth(), rRect.y + m_nHeight - 3}; + LINEBUNDLE vLine; vLine.lColor = vColBack.GetPixel();