X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b7cd5325b38a7179a3ec9624533f4bd0c95466d..d515c32dc3b653c20661dcb2841fc7e6f3e323ee:/src/os2/ownerdrw.cpp?ds=sidebyside diff --git a/src/os2/ownerdrw.cpp b/src/os2/ownerdrw.cpp index 75c8906036..9e9dd6568d 100644 --- a/src/os2/ownerdrw.cpp +++ b/src/os2/ownerdrw.cpp @@ -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