Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2016-01-21 14:53:28 -0500
committerSravan Kumar Lakkimsetti2016-02-08 04:17:40 -0500
commit45bb33775fc0e662f7a581dfaebbdca89fb1aa10 (patch)
treefb60baa5083dc2ad5bf46638163c895608fef20c /bundles
parent9890292f7bba6f17026ce3bc1d6ca7fb05d4ae2c (diff)
downloadeclipse.platform.swt-45bb33775fc0e662f7a581dfaebbdca89fb1aa10.tar.gz
eclipse.platform.swt-45bb33775fc0e662f7a581dfaebbdca89fb1aa10.tar.xz
eclipse.platform.swt-45bb33775fc0e662f7a581dfaebbdca89fb1aa10.zip
Bug 486302 - [GTK3] Inconsistent Tree/TableItem.getBounds(int) and getBounds()
Apply the fix that was applied to getBounds(int) to getBounds() Change-Id: Ib4e0cc90717336fbc89d9d6e0d4fb54f767f3c0d Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java6
2 files changed, 10 insertions, 2 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
index 63f4964c32..025f8e6688 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java
@@ -313,7 +313,11 @@ public Rectangle getBounds () {
}
}
int width = OS.gtk_tree_view_column_get_visible (column) ? rect.width + 1 : 0;
- return new Rectangle (rect.x, rect.y, width, rect.height + 1);
+ Rectangle r = new Rectangle (rect.x, rect.y, width, rect.height + 1);
+ if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
+ r.y += parent.getHeaderHeight();
+ }
+ return r;
}
/**
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
index 8269fb7cf3..dcc5701020 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
@@ -510,7 +510,11 @@ public Rectangle getBounds () {
}
}
int width = OS.gtk_tree_view_column_get_visible (column) ? rect.width + 1 : 0;
- return new Rectangle (rect.x, rect.y, width, rect.height + 1);
+ Rectangle r = new Rectangle (rect.x, rect.y, width, rect.height + 1);
+ if (parent.getHeaderVisible() && OS.GTK_VERSION > OS.VERSION(3, 9, 0)) {
+ r.y += parent.getHeaderHeight();
+ }
+ return r;
}
/**

Back to the top