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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user