From 8081477a43f8203dd2511d802ca56e3d7c93e15d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 10 Aug 2021 19:18:35 +0200 Subject: [PATCH] Revert "Mac: Fix truncation of images in wxDataViewCtrl" This reverts commit d2fc88c03dcba3f2d533030d3fa83438dac016af. --- src/osx/cocoa/dataview.mm | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/osx/cocoa/dataview.mm b/src/osx/cocoa/dataview.mm index 3928f700f1..d5939b62ec 100644 --- a/src/osx/cocoa/dataview.mm +++ b/src/osx/cocoa/dataview.mm @@ -2251,7 +2251,6 @@ void wxCocoaDataViewControl::FitColumnWidthToContent(unsigned int pos) MaxWidthCalculator(wxCocoaOutlineView *view, NSTableColumn *column, unsigned columnIndex) : m_width(0), - m_height(0), m_view(view), m_column(columnIndex), m_indent(0), @@ -2272,7 +2271,6 @@ void wxCocoaDataViewControl::FitColumnWidthToContent(unsigned int pos) { NSCell *cell = [m_view preparedCellAtColumn:m_column row:row]; unsigned cellWidth = ceil([cell cellSize].width); - unsigned cellHeight = ceil([cell cellSize].height); if ( m_indent ) cellWidth += m_indent * [m_view levelForRow:row]; @@ -2284,16 +2282,13 @@ void wxCocoaDataViewControl::FitColumnWidthToContent(unsigned int pos) } m_width = wxMax(m_width, cellWidth); - m_height = wxMax(m_height, cellHeight); } int GetMaxWidth() const { return m_width; } - int GetMaxHeight() const { return m_height; } int GetExpanderWidth() const { return m_expander; } private: int m_width; - int m_height; wxCocoaOutlineView *m_view; unsigned m_column; int m_indent; @@ -2375,14 +2370,6 @@ void wxCocoaDataViewControl::FitColumnWidthToContent(unsigned int pos) m_expanderWidth = calculator.GetExpanderWidth(); [column setWidth:calculator.GetMaxWidth() + m_expanderWidth]; - - if ( !(GetDataViewCtrl()->GetWindowStyle() & wxDV_VARIABLE_LINE_HEIGHT) ) - { - int curHeight = ceil([m_OutlineView rowHeight]); - int rowHeight = calculator.GetMaxHeight(); - if ( rowHeight > curHeight ) - SetRowHeight(rowHeight); - } } //