From: Robert Roebling Date: Sat, 5 Apr 2008 18:22:37 +0000 (+0000) Subject: Always interpret a column width of -1 as 80 until somthing better is found X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/973dc9079c2e3408f5a57d956c6950a801959264 Always interpret a column width of -1 as 80 until somthing better is found git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 673814770e..c1a3c82123 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -2649,7 +2649,16 @@ void wxDataViewColumn::SetWidth( int width ) { if (width < 0) { +#if 1 + gtk_tree_view_column_set_sizing( GTK_TREE_VIEW_COLUMN(m_column), GTK_TREE_VIEW_COLUMN_FIXED ); + + // TODO find a better calculation + gtk_tree_view_column_set_fixed_width( GTK_TREE_VIEW_COLUMN(m_column), 80 ); +#else + // this is unpractical for large numbers of items and disables + // user resizing, which is totally unexpected gtk_tree_view_column_set_sizing( GTK_TREE_VIEW_COLUMN(m_column), GTK_TREE_VIEW_COLUMN_AUTOSIZE ); +#endif } else {