X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f51f94ea2e721d2de718d8fa0bcfad801fa31f99..fed628b632d8ae95efded1f6a6894573c7a76bef:/src/generic/statusbr.cpp diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index a1309ff0b6..98dc359b26 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -31,11 +31,7 @@ #ifdef __WXMSW__ #include - -#ifdef DrawText -#undef DrawText -#endif - +#include "wx/msw/winundef.h" #endif #if !USE_SHARED_LIBRARY @@ -84,11 +80,12 @@ bool wxStatusBar::Create(wxWindow *parent, wxWindowID id, m_borderX = wxTHICK_LINE_BORDER; m_borderY = wxTHICK_LINE_BORDER; - bool success = wxWindow::Create(parent, id, pos, size, style, name); + bool success = wxWindow::Create(parent, id, pos, size, style | wxTAB_TRAVERSAL, name); // Don't wish this to be found as a child - parent->GetChildren()->DeleteObject(this); - +#ifndef __WXMAC__ + parent->GetChildren().DeleteObject(this); +#endif InitColours(); SetFont(m_defaultStatusBarFont); @@ -172,8 +169,8 @@ void wxStatusBar::OnPaint(wxPaintEvent& WXUNUSED(event) ) wxPaintDC dc(this); int i; - if ( GetFont() ) - dc.SetFont(*GetFont()); + if ( GetFont().Ok() ) + dc.SetFont(GetFont()); dc.SetBackgroundMode(wxTRANSPARENT); for ( i = 0; i < m_nFields; i ++ ) @@ -188,7 +185,7 @@ void wxStatusBar::DrawFieldText(wxDC& dc, int i) { int leftMargin = 2; - wxRectangle rect; + wxRect rect; GetFieldRect(i, rect); wxString text(GetStatusText(i)); @@ -199,6 +196,11 @@ void wxStatusBar::DrawFieldText(wxDC& dc, int i) int xpos = rect.x + leftMargin; int ypos = (int) (((rect.height - y) / 2 ) + rect.y + 0.5) ; + +#if defined( __WXGTK__ ) || defined(__WXMAC__) + xpos++; + ypos++; +#endif dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height); @@ -209,7 +211,7 @@ void wxStatusBar::DrawFieldText(wxDC& dc, int i) void wxStatusBar::DrawField(wxDC& dc, int i) { - wxRectangle rect; + wxRect rect; GetFieldRect(i, rect); // Draw border @@ -238,7 +240,7 @@ void wxStatusBar::DrawField(wxDC& dc, int i) } // Get the position and size of the field's internal bounding rectangle -bool wxStatusBar::GetFieldRect(int n, wxRectangle& rect) const +bool wxStatusBar::GetFieldRect(int n, wxRect& rect) const { if ((n < 0) || (n >= m_nFields)) return FALSE;