X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/888dde65f43d5f57e8fb2028b27191cca1741403..d53f610c1c224b6a0f58e4009b2bce553b1ff7b9:/src/msw/renderer.cpp diff --git a/src/msw/renderer.cpp b/src/msw/renderer.cpp index cbbd2a406a..c2b4173972 100644 --- a/src/msw/renderer.cpp +++ b/src/msw/renderer.cpp @@ -35,6 +35,7 @@ #include "wx/splitter.h" #include "wx/renderer.h" #include "wx/msw/private.h" +#include "wx/msw/dc.h" #include "wx/msw/uxtheme.h" // tmschema.h is in Win32 Platform SDK and might not be available with earlier @@ -121,6 +122,8 @@ public: const wxRect& rect, int flags = 0); + virtual wxSize GetCheckBoxSize(wxWindow *win); + virtual int GetHeaderButtonHeight(wxWindow *win); private: @@ -294,6 +297,12 @@ void wxRendererMSW::DrawFocusRect(wxWindow * WXUNUSED(win), ::DrawFocusRect(GetHdcOf(*((wxMSWDCImpl*)dc.GetImpl())), &rc); } +wxSize wxRendererMSW::GetCheckBoxSize(wxWindow * WXUNUSED(win)) +{ + return wxSize(::GetSystemMetrics(SM_CXMENUCHECK), + ::GetSystemMetrics(SM_CYMENUCHECK)); +} + int wxRendererMSW::GetHeaderButtonHeight(wxWindow * WXUNUSED(win)) { // some "reasonable" value returned in case of error, it doesn't really @@ -559,7 +568,7 @@ wxRendererXP::DrawItemSelectionRect(wxWindow *win, dc.SetBrush(brush); dc.SetPen(*wxTRANSPARENT_PEN); dc.DrawRectangle( rect ); - + if ((flags & wxCONTROL_FOCUSED) && (flags & wxCONTROL_CURRENT)) DrawFocusRect( win, dc, rect, flags ); }