improve look of wxDataViewCtrl and of its renderer on wxMSW when windows XP themeing is not used (wxRendererXP::DrawItemSelectionRect implementation is ok also for wxRendererMSW; share the code).
Fix a typo in the drawing code for horizontal rules in wxDataViewCtrl. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -861,14 +861,6 @@ bool wxDataViewToggleRenderer::GetValue( wxVariant &WXUNUSED(value) ) const
|
||||
|
||||
bool wxDataViewToggleRenderer::Render( wxRect cell, wxDC *dc, int WXUNUSED(state) )
|
||||
{
|
||||
// User wxRenderer here
|
||||
|
||||
wxRect rect;
|
||||
rect.x = cell.x + cell.width/2 - 10;
|
||||
rect.width = 20;
|
||||
rect.y = cell.y + cell.height/2 - 10;
|
||||
rect.height = 20;
|
||||
|
||||
int flags = 0;
|
||||
if (m_toggle)
|
||||
flags |= wxCONTROL_CHECKED;
|
||||
@@ -878,7 +870,7 @@ bool wxDataViewToggleRenderer::Render( wxRect cell, wxDC *dc, int WXUNUSED(state
|
||||
wxRendererNative::Get().DrawCheckBox(
|
||||
GetOwner()->GetOwner(),
|
||||
*dc,
|
||||
rect,
|
||||
cell,
|
||||
flags );
|
||||
|
||||
return true;
|
||||
@@ -897,7 +889,9 @@ bool wxDataViewToggleRenderer::Activate( wxRect WXUNUSED(cell),
|
||||
|
||||
wxSize wxDataViewToggleRenderer::GetSize() const
|
||||
{
|
||||
return wxSize(20,20);
|
||||
// the window parameter is not used by GetCheckBoxSize() so it's
|
||||
// safe to pass NULL
|
||||
return wxRendererNative::Get().GetCheckBoxSize(NULL);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------
|
||||
@@ -1681,7 +1675,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
dc.SetPen(m_penRule);
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
|
||||
for (unsigned int i = item_start; i <= item_last+1; i++)
|
||||
for (unsigned int i = item_start; i <= item_last; i++)
|
||||
{
|
||||
int y = GetLineStart( i );
|
||||
dc.DrawLine(x_start, y, x_last, y);
|
||||
|
Reference in New Issue
Block a user