From: Vadim Zeitlin Date: Fri, 23 Dec 2005 01:00:30 +0000 (+0000) Subject: don't set minimal column width, it should be possible to set it even to 0 if desired... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/98cb8dcb0cf3b0e660f1f67e1c02451ab10257de don't set minimal column width, it should be possible to set it even to 0 if desired (e.g. to hide a column) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index dff0f46813..4b725aaad4 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -137,9 +137,8 @@ static const int MARGIN_BETWEEN_ROWS = 6; // when autosizing the columns, add some slack static const int AUTOSIZE_COL_MARGIN = 10; -// default and minimal widths for the header columns +// default width for the header columns static const int WIDTH_COL_DEFAULT = 80; -static const int WIDTH_COL_MIN = 10; // the space between the image and the text in the report mode static const int IMAGE_MARGIN_IN_REPORT_MODE = 5; @@ -1075,11 +1074,7 @@ void wxListHeaderData::SetHeight( int h ) void wxListHeaderData::SetWidth( int w ) { - m_width = w; - if (m_width < 0) - m_width = WIDTH_COL_DEFAULT; - else if (m_width < WIDTH_COL_MIN) - m_width = WIDTH_COL_MIN; + m_width = w < 0 ? WIDTH_COL_DEFAULT : w; } void wxListHeaderData::SetFormat( int format )