Revert "Mac: Fix truncation of images in wxDataViewCtrl"
This reverts commit d2fc88c03d.
This commit is contained in:
parent
2d302cf143
commit
8081477a43
1 changed files with 0 additions and 13 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue