From b2194d9ad59a5603a26d9f97820df8bd196d0f97 Mon Sep 17 00:00:00 2001 From: Ilya Sinitsyn Date: Tue, 1 Oct 2019 13:02:00 +0700 Subject: [PATCH] Fix the native header column minimal width determination wxGrid::AutoSizeColumn can set per column minimal width and this values must be used for native headers columns. --- include/wx/generic/grid.h | 1 + include/wx/generic/private/grid.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index c16fdec83c..6a33df90de 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -2282,6 +2282,7 @@ protected: friend class wxGridWindow; friend class wxGridHeaderRenderer; + friend class wxGridHeaderColumn; friend class wxGridHeaderCtrl; private: diff --git a/include/wx/generic/private/grid.h b/include/wx/generic/private/grid.h index a050da3c6f..cd92f64fe5 100644 --- a/include/wx/generic/private/grid.h +++ b/include/wx/generic/private/grid.h @@ -95,7 +95,7 @@ public: virtual wxString GetTitle() const wxOVERRIDE { return m_grid->GetColLabelValue(m_col); } virtual wxBitmap GetBitmap() const wxOVERRIDE { return wxNullBitmap; } virtual int GetWidth() const wxOVERRIDE { return m_grid->GetColSize(m_col); } - virtual int GetMinWidth() const wxOVERRIDE { return m_grid->GetColMinimalAcceptableWidth(); } + virtual int GetMinWidth() const wxOVERRIDE { return m_grid->GetColMinimalWidth(m_col); } virtual wxAlignment GetAlignment() const wxOVERRIDE { int horz,