Stop hardcoding focus border size in collapsible pane header

Use the theme- and DPI-dependent size of the border instead.

See https://github.com/wxWidgets/wxWidgets/pull/1580
This commit is contained in:
Vadim Zeitlin
2019-10-01 20:38:00 +02:00
parent 43e1066f10
commit cfcb7111cd

View File

@@ -30,6 +30,10 @@
#include "wx/renderer.h"
#ifdef __WXMSW__
#include "wx/msw/private.h"
#endif // __WXMSW__
// if we have another implementation of this class we should extract
// the lines below to a common file
@@ -95,7 +99,8 @@ wxSize wxGenericCollapsibleHeaderCtrl::DoGetBestClientSize() const
size.y = textSize.y;
#ifdef __WXMSW__
size.IncBy(1);
size.IncBy(wxGetSystemMetrics(SM_CXFOCUSBORDER, this),
wxGetSystemMetrics(SM_CYFOCUSBORDER, this));
#endif // __WXMSW__
return size;