X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d697657f1ec08e787f06bbb36be3d1bb4858101d..7948c0c24401c496c04da3c28f1f1f2f282ba327:/src/os2/dc.cpp diff --git a/src/os2/dc.cpp b/src/os2/dc.cpp index 20d3f61a4c..4a5cef4e16 100644 --- a/src/os2/dc.cpp +++ b/src/os2/dc.cpp @@ -24,6 +24,9 @@ #include "wx/icon.h" #include "wx/msgdlg.h" #include "wx/module.h" +#if wxUSE_STATUSBAR + #include "wx/statusbr.h" +#endif #endif #include "wx/dcprint.h" @@ -1038,7 +1041,7 @@ void wxDC::DoDrawRectangle( if(m_brush.GetStyle() == wxTRANSPARENT) lControl = DRO_OUTLINE; - ::GpiSetColor(m_hPS, lColor); + ::GpiSetColor(m_hPS, lBorderColor); ::GpiBox( m_hPS // handle to a presentation space ,lControl // draw the box outline ? or ? ,&vPoint[1] // address of the corner @@ -1390,7 +1393,7 @@ void wxDC::DoDrawBitmap( // // Need to get a background color for mask blitting // - if (IsKindOf(CLASSINFO(wxPaintDC))) + if (IsKindOf(CLASSINFO(wxWindowDC))) { wxWindowDC* pWindowDC = wxDynamicCast(this, wxWindowDC); @@ -1769,14 +1772,25 @@ void wxDC::DrawAnyText( m_vRclPaint.yBottom == 0 && m_vRclPaint.xRight == 0 && m_vRclPaint.xLeft == 0)) - vPtlStart.y = OS2Y(vY,vTextY/1.5); // Full extent is a bit much + { + // + // Position Text a little differently in the Statusbar from other panels + // + if (m_pCanvas && m_pCanvas->IsKindOf(CLASSINFO(wxStatusBar))) + vPtlStart.y = OS2Y(vY,vTextY); + else + vPtlStart.y = OS2Y(vY,vTextY/1.5); // Full extent is a bit much + } else { if (m_vSelectedBitmap != wxNullBitmap) { m_vRclPaint.yTop = m_vSelectedBitmap.GetHeight(); m_vRclPaint.xRight = m_vSelectedBitmap.GetWidth(); - vPtlStart.y = OS2Y(vY,vTextY/1.5); + if (m_pCanvas && m_pCanvas->IsKindOf(CLASSINFO(wxStatusBar))) + vPtlStart.y = OS2Y(vY,vTextY); + else + vPtlStart.y = OS2Y(vY,vTextY/1.5); } else vPtlStart.y = vY;