X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8dba8632c5bcd64724e2e9e2d40e295555a0cb86..7b82d78291036d3abb54f5ae259f5dfb958b9c0c:/src/mac/statbrma.cpp diff --git a/src/mac/statbrma.cpp b/src/mac/statbrma.cpp index a88dc6f72c..139b505f8e 100644 --- a/src/mac/statbrma.cpp +++ b/src/mac/statbrma.cpp @@ -25,6 +25,10 @@ BEGIN_EVENT_TABLE(wxStatusBarMac, wxStatusBarGeneric) EVT_PAINT(wxStatusBarMac::OnPaint) END_EVENT_TABLE() +#ifdef __WXMAC__ +#include "wx/mac/private.h" +#endif + // ============================================================================ // implementation // ============================================================================ @@ -55,6 +59,11 @@ void wxStatusBarMac::DrawFieldText(wxDC& dc, int i) wxRect rect; GetFieldRect(i, rect); + + if ( !IsWindowHilited( MAC_WXHWND( MacGetRootWindow() ) ) ) + { + dc.SetTextForeground( wxColour( 0x80 , 0x80 , 0x80 ) ) ; + } wxString text(GetStatusText(i)); @@ -101,7 +110,10 @@ void wxStatusBarMac::SetStatusText(const wxString& text, int number) void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event) ) { wxPaintDC dc(this); - wxPen black( wxBLACK , 1 , wxSOLID ) ; + + if ( IsWindowHilited( MAC_WXHWND( MacGetRootWindow() ) ) ) + { + wxPen black( wxBLACK , 1 , wxSOLID ) ; wxPen white( wxWHITE , 1 , wxSOLID ) ; dc.SetPen(black); @@ -110,7 +122,13 @@ void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event) ) dc.SetPen(white); dc.DrawLine(0, 1 , m_width , 1); - + } + else + { + dc.SetPen(wxPen(wxColour(0x80,0x80,0x80),1,wxSOLID)); + dc.DrawLine(0, 0 , + m_width , 0); + } int i; if ( GetFont().Ok() ) @@ -124,3 +142,9 @@ void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event) ) dc.SetFont(wxNullFont); # endif // MSW } + +void wxStatusBarMac::MacSuperEnabled( bool enabled ) +{ + Refresh(FALSE) ; + wxWindow::MacSuperEnabled( enabled ) ; +} \ No newline at end of file