diff --git a/docs/changes.txt b/docs/changes.txt index 80c746a309..55618bd2cf 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -85,6 +85,7 @@ wxOSX: - Set up extensions filter correctly in wxFileDialog (nick863). - Turn off automatic quotes substitutions in wxTextCtrl (Xlord2). - Implement wxDataViewChoiceByIndexRenderer (wanup). +- Fix unnecessary indentation in list-like wxDataViewCtrl (Andreas Falkenhahn). Unix: diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index 61f493874a..3bd3efadb7 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -2239,6 +2239,15 @@ bool wxCocoaDataViewControl::AssociateModel(wxDataViewModel* model) else m_DataSource = NULL; [m_OutlineView setDataSource:m_DataSource]; // if there is a data source the data is immediately going to be requested + + // By default, the first column is indented to leave enough place for the + // expanders, but this looks bad if there are no expanders, so don't use + // indent in this case. + if ( model && model->IsListModel() ) + { + DoSetIndent(0); + } + return true; }