Respect minimum grid column width when using native header too

Override wxHeaderColumn::GetMinWidth() to return the actual minimum
width instead of just returning 0.

Add a unit test verifying that this works as intended.
This commit is contained in:
Ilya Sinitsyn
2019-08-29 03:50:19 +07:00
committed by Vadim Zeitlin
parent 2290d97453
commit e5d59c6b7f
2 changed files with 42 additions and 1 deletions

View File

@@ -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 0; }
virtual int GetMinWidth() const wxOVERRIDE { return m_grid->GetColMinimalAcceptableWidth(); }
virtual wxAlignment GetAlignment() const wxOVERRIDE
{
int horz,