]> git.saurik.com Git - wxWidgets.git/commitdiff
Add a little space so the wxHtmlCell doesn't overwrite the border of
authorRobin Dunn <robin@alldunn.com>
Wed, 13 Aug 2003 19:46:30 +0000 (19:46 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 13 Aug 2003 19:46:30 +0000 (19:46 +0000)
the selection box

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22812 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/htmllbox.cpp

index 0970e8ef91fa7a6e1350f21ab79f95b2e0f3a9a5..4bbcf8399baff505f4368e88e452d4da4eb6752a 100644 (file)
@@ -302,7 +302,7 @@ void wxHtmlListBox::OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const
     // note that we can't stop drawing exactly at the window boundary as then
     // even the visible cells part could be not drawn, so always draw the
     // entire cell
-    cell->Draw(dc, rect.x, rect.y, 0, INT_MAX, htmlRendInfo);
+    cell->Draw(dc, rect.x+2, rect.y+2, 0, INT_MAX, htmlRendInfo);
 }
 
 wxCoord wxHtmlListBox::OnMeasureItem(size_t n) const
@@ -312,6 +312,6 @@ wxCoord wxHtmlListBox::OnMeasureItem(size_t n) const
     wxHtmlCell *cell = m_cache->Get(n);
     wxCHECK_MSG( cell, 0, _T("this cell should be cached!") );
 
-    return cell->GetHeight() + cell->GetDescent();
+    return cell->GetHeight() + cell->GetDescent() + 4;
 }