You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered this in v2.0.5, but the TextPainter code appears to be the same in 2.4.0.
The method TextPainter.getPreferredHeight(), when calculateWrappedHeight is set, computes the text to display based off cell bounds adjusted for grid lines -- but not adjusted for any horizontal padding added by a wrapping PaddingDecorator.
ICellPainter cellPainter = new TextPainter(m_shouldAutoWrap, false);
cellPainter = new PaddingDecorator( cellPainter,
V_PADDING, H_PADDING, V_PADDING, H_PADDING );
As a consequence, the preferred cell height can be too low when the cell width is just below that required to avoid wrapping the text.
And then the preferred height of the row can be too low, and setting that incorrect preferred height can lead to the row not being tall enough to display the actual wrapping when trimming is considered.
table.doCommand( new TurnViewportOffCommand());
int[] rowPositions = new int[] { 0 }; // header row
int[] gridRowHeights = MaxCellBoundsHelper.getPreferredRowHeights(
table.getConfigRegistry(),
new GCFactory(table),
table,
rowPositions);
if (gridRowHeights != null) {
table.doCommand( new MultiRowResizeCommand(
table, rowPositions, gridRowHeights));
}
table.doCommand( new TurnViewportOnCommand());
The text was updated successfully, but these errors were encountered:
(Forwarded from https://bugs.eclipse.org/bugs/show_bug.cgi?id=583350)
I encountered this in v2.0.5, but the TextPainter code appears to be the same in 2.4.0.
The method TextPainter.getPreferredHeight(), when calculateWrappedHeight is set, computes the text to display based off cell bounds adjusted for grid lines -- but not adjusted for any horizontal padding added by a wrapping PaddingDecorator.
As a consequence, the preferred cell height can be too low when the cell width is just below that required to avoid wrapping the text.
And then the preferred height of the row can be too low, and setting that incorrect preferred height can lead to the row not being tall enough to display the actual wrapping when trimming is considered.
The text was updated successfully, but these errors were encountered: