From 3a78de206a4fd21fecd36626f19003d340d06608 Mon Sep 17 00:00:00 2001 From: Ilya Sinitsyn Date: Fri, 3 May 2019 23:10:16 +0700 Subject: [PATCH] Fix the issue with a last DVC column width on Mac In Cocoa implementation of `wxDataViewControl`: call `sizeLastColumnToFit` function of `NSTableView` in `OnSize` handler (for any amount of columns, previously this function was called only for a singe colunm DVCs). `sizeLastColumnToFit` resizes the last column so the table view fits exactly within its enclosing clip view. This behavior is equivalent to `gtk` and `MSW` realizations. --- src/osx/cocoa/dataview.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index 4b881b6315..ced2cac65b 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -2564,8 +2564,7 @@ void wxCocoaDataViewControl::SetRowHeight(const wxDataViewItem& WXUNUSED(item), void wxCocoaDataViewControl::OnSize() { - if ([m_OutlineView numberOfColumns] == 1) - [m_OutlineView sizeLastColumnToFit]; + [m_OutlineView sizeLastColumnToFit]; } //