From cf90f9cca547a6b124c19fc3559f9630daec0e18 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 16 Oct 2007 21:04:30 +0000 Subject: [PATCH] Correct drawing placement (16px + 1 px border below) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/datavgen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 7c60861449..814de1999a 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -2459,7 +2459,7 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) wxSize size = cell->GetSize(); // Because of the tree structure indent, here we should minus the width of the cell for drawing size.x = wxMin( size.x + 2*PADDING_RIGHTLEFT, cell_rect.width - indent ); - size.y = wxMin( size.y + 2*PADDING_TOPBOTTOM, cell_rect.height ); + size.y = wxMin( size.y + 1*PADDING_TOPBOTTOM, cell_rect.height ); wxRect item_rect(cell_rect.GetTopLeft(), size); int align = cell->GetAlignment(); @@ -2482,9 +2482,9 @@ void wxDataViewMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) ) // add padding item_rect.x += PADDING_RIGHTLEFT; - item_rect.y += PADDING_TOPBOTTOM; + //item_rect.y += PADDING_TOPBOTTOM; item_rect.width = size.x - 2 * PADDING_RIGHTLEFT; - item_rect.height = size.y - 2 * PADDING_TOPBOTTOM; + item_rect.height = size.y - 1 * PADDING_TOPBOTTOM; //Here we add the tree indent item_rect.x += indent;