From bfe44c719b938b4d98a8ed6d9c03c92dfed9054c Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Sun, 9 Oct 2016 20:03:41 +0200 Subject: [PATCH] Do not let wxHeaderCtrl determine the minimum width The minimum width will always be equal to the current size of the parent window (from wxGetClientRect). As a result, controls using wxHeaderCtrl can never be shrunk (e.g. using SetSizeHints). Problem is visible when a wxDataViewCtrl gets a lower DPI. The new minimum size is equal to the current size. --- src/msw/headerctrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/msw/headerctrl.cpp b/src/msw/headerctrl.cpp index 1694a8e288..966f6b04e5 100644 --- a/src/msw/headerctrl.cpp +++ b/src/msw/headerctrl.cpp @@ -195,7 +195,7 @@ wxSize wxHeaderCtrl::DoGetBestSize() const return wxControl::DoGetBestSize(); } - return wxSize(wpos.cx, wpos.cy); + return wxSize(wxDefaultCoord, wpos.cy); } // ----------------------------------------------------------------------------