#include "wx/splitter.h"
#include "wx/dcmirror.h"
+#ifdef __WXMAC__
+ #include "wx/osx/private.h"
+#endif
+
// ----------------------------------------------------------------------------
// wxRendererGeneric: our wxRendererNative implementation
// ----------------------------------------------------------------------------
wxHeaderSortIconType sortArrow,
wxHeaderButtonParams* params)
{
- const int CORNER = 1;
-
const wxCoord x = rect.x,
y = rect.y,
w = rect.width,
dc.SetBrush(*wxTRANSPARENT_BRUSH);
dc.SetPen(m_penBlack);
- dc.DrawLine( x+w-CORNER+1, y, x+w, y+h ); // right (outer)
- dc.DrawRectangle( x, y+h, w+1, 1 ); // bottom (outer)
+ dc.DrawLine( x+w-1, y, x+w-1, y+h ); // right (outer)
+ dc.DrawLine( x, y+h-1, x+w, y+h-1 ); // bottom (outer)
dc.SetPen(m_penDarkGrey);
- dc.DrawLine( x+w-CORNER, y, x+w-1, y+h ); // right (inner)
- dc.DrawRectangle( x+1, y+h-1, w-2, 1 ); // bottom (inner)
+ dc.DrawLine( x+w-2, y+1, x+w-2, y+h-1 ); // right (inner)
+ dc.DrawLine( x+1, y+h-2, x+w-1, y+h-2 ); // bottom (inner)
dc.SetPen(m_penHighlight);
- dc.DrawRectangle( x, y, w-CORNER+1, 1 ); // top (outer)
- dc.DrawRectangle( x, y, 1, h ); // left (outer)
- dc.DrawLine( x, y+h-1, x+1, y+h-1 );
- dc.DrawLine( x+w-1, y, x+w-1, y+1 );
+ dc.DrawLine( x, y, x, y+h-1 ); // left (outer)
+ dc.DrawLine( x, y, x+w-1, y ); // top (outer)
return DrawHeaderButtonContents(win, dc, rect, flags, sortArrow, params);
}
dc.SetFont(font);
dc.SetTextForeground(clr);
- dc.SetBackgroundMode(wxTRANSPARENT);
+ dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
int tw, th, td, x, y;
dc.GetTextExtent( label, &tw, &th, &td);
}
void
+#ifdef __WXMAC__
+wxRendererGeneric::DrawItemSelectionRect(wxWindow * win,
+ wxDC& dc,
+ const wxRect& rect,
+ int flags)
+#else
wxRendererGeneric::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
wxDC& dc,
const wxRect& rect,
int flags)
+#endif
{
wxBrush brush;
if ( flags & wxCONTROL_SELECTED )
}
dc.SetBrush(brush);
- dc.SetPen(flags & wxCONTROL_CURRENT ? *wxBLACK_PEN : *wxTRANSPARENT_PEN);
+ if ((flags & wxCONTROL_CURRENT) && (flags & wxCONTROL_FOCUSED)
+#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
+ && IsControlActive( (ControlRef)win->GetHandle() )
+#endif
+ )
+ dc.SetPen( *wxBLACK_PEN );
+ else
+ dc.SetPen( *wxTRANSPARENT_PEN );
dc.DrawRectangle( rect );
}