OS/2 updates for statusbar processing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8632 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -175,25 +175,22 @@ void wxStatusBarGeneric::OnPaint(wxPaintEvent& WXUNUSED(event) )
|
|||||||
{
|
{
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
|
|
||||||
#ifdef __WXPM__
|
|
||||||
RECTL wrectl;
|
|
||||||
|
|
||||||
::WinQueryWindowRect(GetHWND(), &wrectl);
|
|
||||||
::WinFillRect(dc.GetHDC(), &wrectl, CLR_BLACK);
|
|
||||||
#else
|
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
if ( GetFont().Ok() )
|
if ( GetFont().Ok() )
|
||||||
dc.SetFont(GetFont());
|
dc.SetFont(GetFont());
|
||||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||||
|
|
||||||
|
#ifdef __WXPM__
|
||||||
|
::WinFillRect(vDC.m_hPS, &vDC.m_rclPaint, CLR_GREEN);
|
||||||
|
#endif
|
||||||
|
|
||||||
for ( i = 0; i < m_nFields; i ++ )
|
for ( i = 0; i < m_nFields; i ++ )
|
||||||
DrawField(dc, i);
|
DrawField(dc, i);
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
dc.SetFont(wxNullFont);
|
dc.SetFont(wxNullFont);
|
||||||
#endif // MSW
|
#endif // MSW
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStatusBarGeneric::DrawFieldText(wxDC& dc, int i)
|
void wxStatusBarGeneric::DrawFieldText(wxDC& dc, int i)
|
||||||
@@ -207,11 +204,21 @@ void wxStatusBarGeneric::DrawFieldText(wxDC& dc, int i)
|
|||||||
|
|
||||||
long x, y;
|
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);
|
dc.GetTextExtent(text, &x, &y);
|
||||||
|
|
||||||
int xpos = rect.x + leftMargin;
|
int xpos = rect.x + leftMargin;
|
||||||
int ypos = (int) (((rect.height - y) / 2 ) + rect.y + 0.5) ;
|
int ypos = (int) (((rect.height - y) / 2 ) + rect.y + 0.5) ;
|
||||||
|
|
||||||
|
#endif // __WXPM__
|
||||||
|
|
||||||
#if defined( __WXGTK__ ) || defined(__WXMAC__)
|
#if defined( __WXGTK__ ) || defined(__WXMAC__)
|
||||||
xpos++;
|
xpos++;
|
||||||
ypos++;
|
ypos++;
|
||||||
@@ -261,7 +268,11 @@ bool wxStatusBarGeneric::GetFieldRect(int n, wxRect& rect) const
|
|||||||
_T("invalid status bar field index") );
|
_T("invalid status bar field index") );
|
||||||
|
|
||||||
int width, height;
|
int width, height;
|
||||||
|
#ifdef __WXPM__
|
||||||
|
GetSize(&width, &height);
|
||||||
|
#else
|
||||||
GetClientSize(&width, &height);
|
GetClientSize(&width, &height);
|
||||||
|
#endif
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
int sum_of_nonvar = 0;
|
int sum_of_nonvar = 0;
|
||||||
|
Reference in New Issue
Block a user