X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/37d403aa1cf182cfc01e2ce1753c2dda39ba82ea..49e399d8c0f2683a885bfec77e43cfde3b2249f4:/src/generic/statusbr.cpp diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 9121f45f62..d661b1be08 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -175,18 +175,22 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) ) { wxPaintDC dc(this); + int i; if ( GetFont().Ok() ) dc.SetFont(GetFont()); dc.SetBackgroundMode(wxTRANSPARENT); - dc.SetTextForeground(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT)); + +#ifdef __WXPM__ + ::WinFillRect(dc.m_hPS, &dc.m_vRclPaint, CLR_GREEN); +#endif for ( i = 0; i < m_nFields; i ++ ) DrawField(dc, i); -# ifdef __WXMSW__ - dc.SetFont(wxNullFont); -# endif // MSW +#ifdef __WXMSW__ + dc.SetFont(wxNullFont); +#endif // MSW } void wxStatusBarGeneric::DrawFieldText(wxDC& dc, int i) @@ -200,11 +204,21 @@ void wxStatusBarGeneric::DrawFieldText(wxDC& dc, int i) long x, y; +#if defined(__WXPM__) + long decsent; + + dc.GetTextExtent(text, &x, &y,&decsent); + int xpos = rect.x + leftMargin; + int ypos = (int) (((rect.height - y + 1) / 2 ) + rect.y + decsent ) ; + +#else dc.GetTextExtent(text, &x, &y); int xpos = rect.x + leftMargin; int ypos = (int) (((rect.height - y) / 2 ) + rect.y + 0.5) ; +#endif // __WXPM__ + #if defined( __WXGTK__ ) || defined(__WXMAC__) xpos++; ypos++; @@ -254,7 +268,11 @@ bool wxStatusBarGeneric::GetFieldRect(int n, wxRect& rect) const _T("invalid status bar field index") ); int width, height; +#ifdef __WXPM__ + GetSize(&width, &height); +#else GetClientSize(&width, &height); +#endif int i; int sum_of_nonvar = 0; @@ -321,7 +339,7 @@ bool wxStatusBarGeneric::GetFieldRect(int n, wxRect& rect) const void wxStatusBarGeneric::InitColours() { // Shadow colours -#ifndef __WIN16__ +#if defined(__WIN95__) wxColour mediumShadowColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_3DSHADOW)); m_mediumShadowPen = wxPen(mediumShadowColour, 1, wxSOLID);