X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/489468feaa08b8f504735eecca522fb8d0f825d2..689d801314845c6db093358a81c7879b672aa5e6:/src/osx/carbon/statbrma.cpp diff --git a/src/osx/carbon/statbrma.cpp b/src/osx/carbon/statbrma.cpp index 926198c3b0..d16703f43f 100644 --- a/src/osx/carbon/statbrma.cpp +++ b/src/osx/carbon/statbrma.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: src/mac/carbon/statbarma.cpp +// Name: src/osx/carbon/statbarma.cpp // Purpose: native implementation of wxStatusBar (optional) // Author: Stefan Csomor // Modified by: @@ -21,7 +21,7 @@ #include "wx/toplevel.h" #endif -#include "wx/mac/private.h" +#include "wx/osx/private.h" BEGIN_EVENT_TABLE(wxStatusBarMac, wxStatusBarGeneric) @@ -58,7 +58,7 @@ bool wxStatusBarMac::Create(wxWindow *parent, wxWindowID id, if ( !wxStatusBarGeneric::Create( parent, id, style, name ) ) return false; - if ( parent->MacGetTopLevelWindow()->MacGetMetalAppearance() ) + if ( parent->MacGetTopLevelWindow()->GetExtraStyle() & wxFRAME_EX_METAL ) SetBackgroundStyle( wxBG_STYLE_TRANSPARENT ); // normal system font is too tall for fitting into the standard height @@ -86,7 +86,7 @@ void wxStatusBarMac::DrawFieldText(wxDC& dc, int i) int xpos = rect.x + leftMargin + 1; int ypos = 1; - if ( MacGetTopLevelWindow()->MacGetMetalAppearance() ) + if ( MacGetTopLevelWindow()->GetExtraStyle() & wxFRAME_EX_METAL ) ypos++; dc.SetClippingRegion(rect.x, 0, rect.width, h); @@ -103,7 +103,7 @@ void wxStatusBarMac::DrawField(wxDC& dc, int i) void wxStatusBarMac::SetStatusText(const wxString& text, int number) { - wxCHECK_RET( (number >= 0) && (number < m_nFields), + wxCHECK_RET( (number >= 0) && ((size_t)number < m_panes.GetCount()), wxT("invalid status bar field index") ); if ( m_statusStrings[number] == text ) @@ -136,7 +136,7 @@ void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event)) if (major >= 10) { // Finder statusbar border color: (Project Builder similar is 9B9B9B) - if ( MacGetTopLevelWindow()->MacGetMetalAppearance() ) + if ( MacGetTopLevelWindow()->GetExtraStyle() & wxFRAME_EX_METAL ) dc.SetPen(wxPen(wxColour(0x40, 0x40, 0x40), 1, wxSOLID)); else dc.SetPen(wxPen(wxColour(0xB1, 0xB1, 0xB1), 1, wxSOLID)); @@ -162,12 +162,11 @@ void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event)) dc.DrawLine(0, 0, w, 0); } - int i; if ( GetFont().Ok() ) dc.SetFont(GetFont()); dc.SetBackgroundMode(wxTRANSPARENT); - for ( i = 0; i < m_nFields; i ++ ) + for ( size_t i = 0; i < m_panes.GetCount(); i ++ ) DrawField(dc, i); }