]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/datavgen.cpp
Always draw standard-sized checkboxes in generic wxDataViewToggleRenderer.
[wxWidgets.git] / src / generic / datavgen.cpp
index a13797b3f6179518439c8516e56189bd5062f6d7..2cb09a49ca22c0f102a9aeeda3866b319abc6599 100644 (file)
@@ -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,