Use correct expander size in wxDataViewCtrl under MSW

Add wxRendererNative::GetExpanderSize(), implement it using the
appropriate theme element and use it instead of hardcoding the expander
size to 3 character widths.

Closes https://github.com/wxWidgets/wxWidgets/pull/1431

Closes #18449.
This commit is contained in:
PeterO
2019-07-19 23:38:27 +02:00
committed by Vadim Zeitlin
parent 3d970a9c08
commit 8f386265dc
5 changed files with 55 additions and 6 deletions

View File

@@ -108,6 +108,8 @@ public:
virtual wxSize GetCheckBoxSize(wxWindow *win) wxOVERRIDE;
virtual wxSize GetExpanderSize(wxWindow *win) wxOVERRIDE;
virtual void DrawPushButton(wxWindow *win,
wxDC& dc,
const wxRect& rect,
@@ -719,6 +721,13 @@ wxSize wxRendererGeneric::GetCheckBoxSize(wxWindow *win)
return win->FromDIP(wxSize(16, 16));
}
wxSize wxRendererGeneric::GetExpanderSize(wxWindow *win)
{
wxCHECK_MSG( win, wxSize(0, 0), "Must have a valid window" );
return win->FromDIP(wxSize(16, 16));
}
void
wxRendererGeneric::DrawPushButton(wxWindow *win,
wxDC& dc,