]> git.saurik.com Git - wxWidgets.git/commitdiff
render scrollbar's thumb as stippled bar to distinguish it from controls
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 30 Oct 2006 10:19:21 +0000 (10:19 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 30 Oct 2006 10:19:21 +0000 (10:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/univ/themes/mono.cpp

index 58fa6ac55183be0fcd8c5f29ed63994733d1e9a5..221a7162ff1bf471bc0d18b4c13f6174db0376a2 100644 (file)
@@ -1039,7 +1039,18 @@ void wxMonoRenderer::DrawScrollbarThumb(wxDC& dc,
                                         const wxRect& rect,
                                         int WXUNUSED(flags))
 {
-    DrawSolidRect(dc, wxMONO_FG_COL, rect);
+    DrawSolidRect(dc, wxMONO_BG_COL, rect);
+
+    // manually draw stipple pattern (wxDFB doesn't implement the wxSTIPPLE
+    // brush style):
+    dc.SetPen(m_penFg);
+    for ( wxCoord y = rect.GetTop(); y <= rect.GetBottom(); y++ )
+    {
+        for ( wxCoord x = rect.GetLeft() + (y % 2); x <= rect.GetRight(); x+=2 )
+        {
+            dc.DrawPoint(x, y);
+        }
+    }
 }
 
 void wxMonoRenderer::DrawScrollbarShaft(wxDC& dc,