aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdriaan Peeters2012-03-01 07:04:00 (EST)
committerTom Schindl2012-03-01 07:04:00 (EST)
commite8cdb03eb6bf832f1ba4484faf33ce3b0fb2e33c (patch)
tree054bff75de5961da430629493ea89ebafc657adc
parentc92593d45ecb264530448db42366f1b7132183e5 (diff)
downloadorg.eclipse.nebula-e8cdb03eb6bf832f1ba4484faf33ce3b0fb2e33c.zip
org.eclipse.nebula-e8cdb03eb6bf832f1ba4484faf33ce3b0fb2e33c.tar.gz
org.eclipse.nebula-e8cdb03eb6bf832f1ba4484faf33ce3b0fb2e33c.tar.bz2
Bug 372825 - Grid column with incorrect since word-wrapping introduction
-rw-r--r--widgets/grid/org.eclipse.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/DefaultCellRenderer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/grid/org.eclipse.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/DefaultCellRenderer.java b/widgets/grid/org.eclipse.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/DefaultCellRenderer.java
index c760bad..4aff2a4 100644
--- a/widgets/grid/org.eclipse.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/DefaultCellRenderer.java
+++ b/widgets/grid/org.eclipse.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/DefaultCellRenderer.java
@@ -436,7 +436,7 @@ public class DefaultCellRenderer extends GridCellRenderer
{
int plainTextWidth;
if (wHint == SWT.DEFAULT)
- plainTextWidth = getBounds().width - x - rightMargin;
+ plainTextWidth = gc.textExtent(item.getText(getColumn())).x;
else
plainTextWidth = wHint - x - rightMargin;