]> git.saurik.com Git - wxWidgets.git/commitdiff
paint the space remaining after the columns too in wxListHeaderWindow::OnPaint()...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 18 Aug 2008 12:02:01 +0000 (12:02 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 18 Aug 2008 12:02:01 +0000 (12:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55117 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/listctrl.cpp

index 8b077662cd589e6f9c22943289d88e5a51acc946..ec924ef4c1e3e7d27f999fdd9d05f30ae559b43a 100644 (file)
@@ -1897,6 +1897,19 @@ void wxListHeaderWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
 
         x += wCol;
     }
+
+    // Fill in what's missing to the right of the columns, otherwise we will
+    // leave an unpainted area when columns are removed (and it looks better)
+    if ( x < w )
+    {
+        wxRendererNative::Get().DrawHeaderButton
+                                (
+                                    this,
+                                    dc,
+                                    wxRect(x, HEADER_OFFSET_Y, w - x, h),
+                                    0
+                                );
+    }
 }
 
 void wxListHeaderWindow::DrawCurrent()