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

@@ -236,6 +236,8 @@ public:
virtual wxSize GetCheckBoxSize(wxWindow *win);
virtual wxSize GetExpanderSize(wxWindow* win);
virtual void DrawPushButton(wxWindow *win, wxDC& dc,
const wxRect& rect, int flags = 0 );
@@ -558,6 +560,16 @@ public:
*/
virtual wxSize GetCheckBoxSize(wxWindow* win) = 0;
/**
Returns the size of the expander used in tree-like controls.
@param win A valid, i.e. non-null, window pointer which is used to get
the theme defining the expander size under some platforms.
@since 3.1.3
*/
virtual wxSize GetExpanderSize(wxWindow* win) = 0;
/**
Returns the height of a header button, either a fixed platform height if
available, or a generic height based on the @a win window's font.