From cfcb7111cd5e98f08bf7dc5d5d4bc6c5f61edd3c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 1 Oct 2019 20:38:00 +0200 Subject: [PATCH] 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 --- src/generic/collheaderctrlg.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/generic/collheaderctrlg.cpp b/src/generic/collheaderctrlg.cpp index 7d0d2cd034..d90bf74b95 100644 --- a/src/generic/collheaderctrlg.cpp +++ b/src/generic/collheaderctrlg.cpp @@ -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;