Make column width calculations in wxDataViewCtrl and wxHeaderCtrl consistent.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70338 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4647,13 +4647,7 @@ unsigned int wxDataViewCtrl::GetBestColumnWidth(int idx) const
|
||||
m_clientArea->GetRowHeight());
|
||||
|
||||
if ( m_headerArea )
|
||||
{
|
||||
int header_width = m_headerArea->GetTextExtent(column->GetTitle()).x;
|
||||
// Labels on native MSW header are indented on both sides
|
||||
header_width +=
|
||||
wxRendererNative::Get().GetHeaderButtonMargin(m_headerArea);
|
||||
calculator.UpdateWithWidth(header_width);
|
||||
}
|
||||
calculator.UpdateWithWidth(m_headerArea->GetColumnTitleWidth(*column));
|
||||
|
||||
// The code below deserves some explanation. For very large controls, we
|
||||
// simply can't afford to calculate sizes for all items, it takes too
|
||||
|
Reference in New Issue
Block a user