aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjgielstra2012-04-15 11:23:14 (EDT)
committerTom Schindl2012-04-15 11:23:14 (EDT)
commit2c3c762455e41bcc4d7651179142eacc992438de (patch)
treef19ec646a616ba76cea8ee097a8b918615dc4619
parente8cdb03eb6bf832f1ba4484faf33ce3b0fb2e33c (diff)
downloadorg.eclipse.nebula-2c3c762455e41bcc4d7651179142eacc992438de.zip
org.eclipse.nebula-2c3c762455e41bcc4d7651179142eacc992438de.tar.gz
org.eclipse.nebula-2c3c762455e41bcc4d7651179142eacc992438de.tar.bz2
Bug 335736 - Grid column header text with AutoHeight(true) and
HeaderWordWrap(true) is drawn outside of header.
-rw-r--r--widgets/grid/org.eclipse.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/DefaultColumnHeaderRenderer.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/widgets/grid/org.eclipse.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/DefaultColumnHeaderRenderer.java b/widgets/grid/org.eclipse.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/DefaultColumnHeaderRenderer.java
index 32d188e..e48aeaf 100644
--- a/widgets/grid/org.eclipse.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/DefaultColumnHeaderRenderer.java
+++ b/widgets/grid/org.eclipse.nebula.widgets.grid/src/org/eclipse/nebula/widgets/grid/internal/DefaultColumnHeaderRenderer.java
@@ -201,7 +201,10 @@ public class DefaultColumnHeaderRenderer extends GridHeaderRenderer
textLayout.setWidth(width < 1 ? 1 : width);
textLayout.setText(text);
y -= textLayout.getBounds().height;
-
+
+ // remove the first line shift
+ y+=gc.getFontMetrics().getHeight();
+
if (column.getParent().isAutoHeight())
{
column.getParent().recalculateHeader();