move wxGridCellRenderer::Draw before other derived classes implementations (no real change)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59245 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -32,6 +32,46 @@
|
||||
#include "wx/tokenzr.h"
|
||||
#include "wx/renderer.h"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGridCellRenderer
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxGridCellRenderer::Draw(wxGrid& grid,
|
||||
wxGridCellAttr& attr,
|
||||
wxDC& dc,
|
||||
const wxRect& rect,
|
||||
int WXUNUSED(row), int WXUNUSED(col),
|
||||
bool isSelected)
|
||||
{
|
||||
dc.SetBackgroundMode( wxBRUSHSTYLE_SOLID );
|
||||
|
||||
wxColour clr;
|
||||
if ( grid.IsEnabled() )
|
||||
{
|
||||
if ( isSelected )
|
||||
{
|
||||
if ( grid.HasFocus() )
|
||||
clr = grid.GetSelectionBackground();
|
||||
else
|
||||
clr = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW);
|
||||
}
|
||||
else
|
||||
{
|
||||
clr = attr.GetBackgroundColour();
|
||||
}
|
||||
}
|
||||
else // grey out fields if the grid is disabled
|
||||
{
|
||||
clr = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE);
|
||||
}
|
||||
|
||||
dc.SetBrush(clr);
|
||||
dc.SetPen( *wxTRANSPARENT_PEN );
|
||||
dc.DrawRectangle(rect);
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGridCellDateTimeRenderer
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -338,44 +378,6 @@ wxGridCellAutoWrapStringRenderer::GetBestSize(wxGrid& grid,
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGridCellRenderer
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxGridCellRenderer::Draw(wxGrid& grid,
|
||||
wxGridCellAttr& attr,
|
||||
wxDC& dc,
|
||||
const wxRect& rect,
|
||||
int WXUNUSED(row), int WXUNUSED(col),
|
||||
bool isSelected)
|
||||
{
|
||||
dc.SetBackgroundMode( wxBRUSHSTYLE_SOLID );
|
||||
|
||||
wxColour clr;
|
||||
if ( grid.IsEnabled() )
|
||||
{
|
||||
if ( isSelected )
|
||||
{
|
||||
if ( grid.HasFocus() )
|
||||
clr = grid.GetSelectionBackground();
|
||||
else
|
||||
clr = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNSHADOW);
|
||||
}
|
||||
else
|
||||
{
|
||||
clr = attr.GetBackgroundColour();
|
||||
}
|
||||
}
|
||||
else // grey out fields if the grid is disabled
|
||||
{
|
||||
clr = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE);
|
||||
}
|
||||
|
||||
dc.SetBrush(clr);
|
||||
dc.SetPen( *wxTRANSPARENT_PEN );
|
||||
dc.DrawRectangle(rect);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxGridCellStringRenderer
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user