From: Vadim Zeitlin Date: Thu, 11 Dec 2008 10:50:59 +0000 (+0000) Subject: don't use MSW-only DEFAULT_ITEM_WIDTH but the width returned by the best class GetBes... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/da678e6c3911929406b8fc49e26c520ac2fd9444 don't use MSW-only DEFAULT_ITEM_WIDTH but the width returned by the best class GetBestSize() in wxHeaderCtrl::DoGetBestSize() implementation for empty header git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57244 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/headerctrlg.cpp b/src/generic/headerctrlg.cpp index e7e4333c5f..85548d7b97 100644 --- a/src/generic/headerctrlg.cpp +++ b/src/generic/headerctrlg.cpp @@ -154,7 +154,7 @@ wxSize wxHeaderCtrl::DoGetBestSize() const { // the vertical size is rather arbitrary but it looks better if we leave // some space around the text - return wxSize(IsEmpty() ? DEFAULT_ITEM_WIDTH + return wxSize(IsEmpty() ? wxHeaderCtrlBase::DoGetBestSize().x : GetColEnd(GetColumnCount() - 1), (7*GetCharHeight())/4); }