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

@@ -253,6 +253,9 @@ public:
// Returns the default size of a check box.
virtual wxSize GetCheckBoxSize(wxWindow *win) = 0;
// Returns the default size of a expander.
virtual wxSize GetExpanderSize(wxWindow *win) = 0;
// draw blank button
//
// flags may use wxCONTROL_PRESSED, wxCONTROL_CURRENT and wxCONTROL_ISDEFAULT
@@ -479,6 +482,9 @@ public:
virtual wxSize GetCheckBoxSize(wxWindow *win) wxOVERRIDE
{ return m_rendererNative.GetCheckBoxSize(win); }
virtual wxSize GetExpanderSize(wxWindow *win) wxOVERRIDE
{ return m_rendererNative.GetExpanderSize(win); }
virtual void DrawPushButton(wxWindow *win,
wxDC& dc,
const wxRect& rect,