Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Fauth2023-01-12 08:41:12 +0000
committerDirk Fauth2023-01-12 08:41:12 +0000
commitdc92fb91e111dc870972ea819349ffe6d555e1a4 (patch)
tree90af39f788bbfd2ebacd0a80e18c4cd245f1c69c
parent2289a66815d36f20dc8668edd8f6d7ad5bac494b (diff)
downloadorg.eclipse.nebula.widgets.nattable-dc92fb91e111dc870972ea819349ffe6d555e1a4.tar.gz
org.eclipse.nebula.widgets.nattable-dc92fb91e111dc870972ea819349ffe6d555e1a4.tar.xz
org.eclipse.nebula.widgets.nattable-dc92fb91e111dc870972ea819349ffe6d555e1a4.zip
Bug 581334 - [GroupBy] GroupByHeaderLayer content scrolls without grid
Signed-off-by: Dirk Fauth <dirk.fauth@googlemail.com> Change-Id: Iec23cc4c85eb27fa82610965a65e397221daf770
-rw-r--r--org.eclipse.nebula.widgets.nattable.extension.glazedlists/src/org/eclipse/nebula/widgets/nattable/extension/glazedlists/groupBy/GroupByHeaderPainter.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/org.eclipse.nebula.widgets.nattable.extension.glazedlists/src/org/eclipse/nebula/widgets/nattable/extension/glazedlists/groupBy/GroupByHeaderPainter.java b/org.eclipse.nebula.widgets.nattable.extension.glazedlists/src/org/eclipse/nebula/widgets/nattable/extension/glazedlists/groupBy/GroupByHeaderPainter.java
index d7b79d31..6b59559e 100644
--- a/org.eclipse.nebula.widgets.nattable.extension.glazedlists/src/org/eclipse/nebula/widgets/nattable/extension/glazedlists/groupBy/GroupByHeaderPainter.java
+++ b/org.eclipse.nebula.widgets.nattable.extension.glazedlists/src/org/eclipse/nebula/widgets/nattable/extension/glazedlists/groupBy/GroupByHeaderPainter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2020 Original authors and others.
+ * Copyright (c) 2012, 2023 Original authors and others.
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
@@ -78,6 +78,13 @@ public class GroupByHeaderPainter extends AbstractCellPainter {
@Override
public void paintCell(ILayerCell cell, GC gc, Rectangle bounds, IConfigRegistry configRegistry) {
+
+ // if x is negative set it to 0 to avoid that the groupby header content
+ // moves out of the visible area
+ if (bounds.x < 0) {
+ bounds.x = 0;
+ }
+
Color originalBackground = gc.getBackground();
Color originalForeground = gc.getForeground();
Font originalFont = gc.getFont();

Back to the top