// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "statbrma.h"
-#endif
-
// ----------------------------------------------------------------------------
// headers
// ----------------------------------------------------------------------------
+#include "wx/wxprec.h"
+
#include "wx/statusbr.h"
#include "wx/dc.h"
#include "wx/dcclient.h"
#ifdef __WXMAC__
#include "wx/mac/private.h"
+#include "wx/toplevel.h"
#endif
// ============================================================================
if ( parent->MacGetTopLevelWindow()->MacGetMetalAppearance() )
MacSetBackgroundBrush( wxNullBrush ) ;
+ // normal system font is too tall for fitting into the standard height
+ SetWindowVariant( wxWINDOW_VARIANT_SMALL ) ;
+
return TRUE ;
}
wxRect rect;
GetFieldRect(i, rect);
- if ( !MacGetTopLevelWindow()->MacGetMetalAppearance() && !IsWindowHilited( MAC_WXHWND( MacGetTopLevelWindowRef() ) ) )
+ if ( !MacIsReallyHilited() )
{
dc.SetTextForeground( wxColour( 0x80 , 0x80 , 0x80 ) ) ;
}
dc.GetTextExtent(text, &x, &y);
int xpos = rect.x + leftMargin + 1 ;
- int ypos = 2 ;
+ int ypos = 1 ;
+ if ( MacGetTopLevelWindow()->MacGetMetalAppearance() )
+ ypos++ ;
+
dc.SetClippingRegion(rect.x, 0, rect.width, h);
dc.DrawText(text, xpos, ypos);
wxCHECK_RET( (number >= 0) && (number < m_nFields),
_T("invalid status bar field index") );
+ if ( m_statusStrings[number] == text )
+ return ;
+
m_statusStrings[number] = text;
wxRect rect;
GetFieldRect(number, rect);
int w, h ;
GetSize( &w , &h ) ;
- if ( IsWindowHilited( MAC_WXHWND( MacGetTopLevelWindowRef() ) ) || MacGetTopLevelWindow()->MacGetMetalAppearance() )
+ if ( MacIsReallyHilited() )
{
- wxPen white( wxWHITE , 1 , wxSOLID ) ;
+ wxPen white( *wxWHITE , 1 , wxSOLID ) ;
if (major >= 10 )
{
//Finder statusbar border color: (Project builder similar is 9B9B9B)
}
else
{
- wxPen black( wxBLACK , 1 , wxSOLID ) ;
+ wxPen black( *wxBLACK , 1 , wxSOLID ) ;
dc.SetPen(black);
}
dc.DrawLine(0, 0 ,
for ( i = 0; i < m_nFields; i ++ )
DrawField(dc, i);
}
+
+void wxStatusBarMac::MacHiliteChanged()
+{
+ Refresh() ;
+ Update() ;
+}