Revert "Mac: Fix truncation of images in wxDataViewCtrl"
This reverts commit d2fc88c03d
.
This commit is contained in:
@@ -2251,7 +2251,6 @@ void wxCocoaDataViewControl::FitColumnWidthToContent(unsigned int pos)
|
|||||||
MaxWidthCalculator(wxCocoaOutlineView *view,
|
MaxWidthCalculator(wxCocoaOutlineView *view,
|
||||||
NSTableColumn *column, unsigned columnIndex)
|
NSTableColumn *column, unsigned columnIndex)
|
||||||
: m_width(0),
|
: m_width(0),
|
||||||
m_height(0),
|
|
||||||
m_view(view),
|
m_view(view),
|
||||||
m_column(columnIndex),
|
m_column(columnIndex),
|
||||||
m_indent(0),
|
m_indent(0),
|
||||||
@@ -2272,7 +2271,6 @@ void wxCocoaDataViewControl::FitColumnWidthToContent(unsigned int pos)
|
|||||||
{
|
{
|
||||||
NSCell *cell = [m_view preparedCellAtColumn:m_column row:row];
|
NSCell *cell = [m_view preparedCellAtColumn:m_column row:row];
|
||||||
unsigned cellWidth = ceil([cell cellSize].width);
|
unsigned cellWidth = ceil([cell cellSize].width);
|
||||||
unsigned cellHeight = ceil([cell cellSize].height);
|
|
||||||
|
|
||||||
if ( m_indent )
|
if ( m_indent )
|
||||||
cellWidth += m_indent * [m_view levelForRow:row];
|
cellWidth += m_indent * [m_view levelForRow:row];
|
||||||
@@ -2284,16 +2282,13 @@ void wxCocoaDataViewControl::FitColumnWidthToContent(unsigned int pos)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_width = wxMax(m_width, cellWidth);
|
m_width = wxMax(m_width, cellWidth);
|
||||||
m_height = wxMax(m_height, cellHeight);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetMaxWidth() const { return m_width; }
|
int GetMaxWidth() const { return m_width; }
|
||||||
int GetMaxHeight() const { return m_height; }
|
|
||||||
int GetExpanderWidth() const { return m_expander; }
|
int GetExpanderWidth() const { return m_expander; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_width;
|
int m_width;
|
||||||
int m_height;
|
|
||||||
wxCocoaOutlineView *m_view;
|
wxCocoaOutlineView *m_view;
|
||||||
unsigned m_column;
|
unsigned m_column;
|
||||||
int m_indent;
|
int m_indent;
|
||||||
@@ -2375,14 +2370,6 @@ void wxCocoaDataViewControl::FitColumnWidthToContent(unsigned int pos)
|
|||||||
m_expanderWidth = calculator.GetExpanderWidth();
|
m_expanderWidth = calculator.GetExpanderWidth();
|
||||||
|
|
||||||
[column setWidth:calculator.GetMaxWidth() + m_expanderWidth];
|
[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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user