From 68d7680d0f68719823563d4692fea6a68d330476 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 19 Dec 2009 11:17:32 +0000 Subject: [PATCH] Always draw standard-sized checkboxes in generic wxDataViewToggleRenderer. The checkbox should be always shown in its normal size, otherwise it looks strange. And this also fixes the overflow of the checkbox in the next column which happened if the size passed to Render() had negative width before. See #11558. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datavgen.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index a13797b3f6..2cb09a49ca 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -800,6 +800,12 @@ bool wxDataViewToggleRenderer::Render( wxRect cell, wxDC *dc, int WXUNUSED(state if (GetMode() != wxDATAVIEW_CELL_ACTIVATABLE) flags |= wxCONTROL_DISABLED; + // check boxes we draw must always have the same, standard size (if it's + // bigger than the cell size the checkbox will be truncated because the + // caller had set the clipping rectangle to prevent us from drawing outside + // the cell) + cell.SetSize(GetSize()); + wxRendererNative::Get().DrawCheckBox( GetOwner()->GetOwner(), *dc, -- 2.47.2