]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/render/render.cpp
Take basic style into account when showing style under cursor
[wxWidgets.git] / samples / render / render.cpp
index b8a3ddc525efebc8a4012ab70a14088822664710..782bd03f70ad8c3ad0b2dfa5c64e897ca63639cd 100644 (file)
@@ -133,8 +133,10 @@ public:
         dc.DrawText(_T("Below is the standard header button drawn"), 10, 10);
         dc.DrawText(_T("using the current renderer:"), 10, 40);
 
-        wxRendererNative::Get().DrawHeaderButton(this, dc,
-                                                 wxRect(20, 70, 100, 60));
+        wxRendererNative& renderer = wxRendererNative::Get();
+        const wxCoord height = renderer.GetHeaderButtonHeight(this);
+
+        renderer.DrawHeaderButton(this, dc, wxRect(20, 70, 100, height));
     }
 
     DECLARE_EVENT_TABLE()