X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/16e93305f2bae16652b6750dffe3bcf05c20d839..1e3698e55d7ee45267b69fa8ed5f94886ad47be9:/src/generic/statusbr.cpp diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 424008eafa..00940d7e0e 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,10 +80,10 @@ 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); + parent->GetChildren().DeleteObject(this); InitColours(); @@ -172,8 +168,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 ++ ) @@ -199,6 +195,11 @@ void wxStatusBar::DrawFieldText(wxDC& dc, int i) int xpos = rect.x + leftMargin; int ypos = (int) (((rect.height - y) / 2 ) + rect.y + 0.5) ; + +#ifdef __WXGTK__ + xpos++; + ypos++; +#endif dc.SetClippingRegion(rect.x, rect.y, rect.width, rect.height);