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
This commit is contained in:
Vadim Zeitlin
2008-12-11 10:50:59 +00:00
parent 648d2bb8f4
commit da678e6c39

View File

@@ -154,7 +154,7 @@ wxSize wxHeaderCtrl::DoGetBestSize() const
{ {
// the vertical size is rather arbitrary but it looks better if we leave // the vertical size is rather arbitrary but it looks better if we leave
// some space around the text // some space around the text
return wxSize(IsEmpty() ? DEFAULT_ITEM_WIDTH return wxSize(IsEmpty() ? wxHeaderCtrlBase::DoGetBestSize().x
: GetColEnd(GetColumnCount() - 1), : GetColEnd(GetColumnCount() - 1),
(7*GetCharHeight())/4); (7*GetCharHeight())/4);
} }