summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2006-02-01 18:57:20 +0000
committerSilenio Quarti <silenio>2006-02-01 18:57:20 +0000
commit408054035bcb26630c91cbfe4394a7eb5906cd34 (patch)
tree4161d14336a84d3f1560e9dfe9dabb94098092d3 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java
parent08bdd667f04d6d0ca77d55a2be02505913c607a9 (diff)
downloadeclipse.platform.swt-408054035bcb26630c91cbfe4394a7eb5906cd34.tar.gz
eclipse.platform.swt-408054035bcb26630c91cbfe4394a7eb5906cd34.tar.xz
eclipse.platform.swt-408054035bcb26630c91cbfe4394a7eb5906cd34.zip
124481 - TreeEditor: ProgressBar does not fill cell correctly
73811 - TableEditor overwrites table header and scrollbars (gtk)
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java58
1 files changed, 5 insertions, 53 deletions
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 36b615b5c6..3e5467346b 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
@@ -362,23 +362,7 @@ public Rectangle getBounds (int index) {
rect.width -= w [0] + buffer [0];
}
}
-
- /*
- * In the horizontal direction, the origin of the bin window is
- * not the same as the origin of the scrolled handle.
- * The method gtk_tree_view_get_cell_area returns the
- * x coordinate relative to the bin window. In order to
- * get the coordinates relative to the top left corner
- * of the client area, we need to account for the
- * horizontal scroll adjustment.
- */
- int[] wx = new int[1];
- OS.gtk_tree_view_tree_to_widget_coords(parentHandle, rect.x, 0, wx, null);
- rect.x = wx[0];
-
- int border = parent.getBorderWidth ();
- int headerHeight = parent.getHeaderHeight ();
- return new Rectangle (rect.x + (index == 0 ? 0 : border), rect.y + (headerHeight == 0 ? border : headerHeight), rect.width + 1, rect.height + 1);
+ return new Rectangle (rect.x, rect.y, rect.width + 1, rect.height + 1);
}
/**
@@ -439,28 +423,12 @@ public Rectangle getBounds () {
OS.gtk_cell_renderer_get_size (pixbufRenderer, parentHandle, null, null, null, w, null);
rect.x += w [0] + horizontalSeparator;
}
-
- /*
- * In the horizontal direction, the origin of the bin window is
- * not the same as the origin of the scrolled handle.
- * The method gtk_tree_view_get_cell_area returns the
- * x coordinate relative to the bin window. In order to
- * get the coordinates relative to the top left corner
- * of the client area, we need to account for the
- * horizontal scroll adjustment.
- */
- int[] wx = new int[1];
- OS.gtk_tree_view_tree_to_widget_coords(parentHandle, rect.x, 0, wx, null);
- rect.x = wx[0];
-
- int border = parent.getBorderWidth ();
- int headerHeight = parent.getHeaderHeight ();
if (parent.columnCount > 0) {
- if (rect.x + border + rect.width > right) {
- rect.width = Math.max (0, right - rect.x - border);
+ if (rect.x + rect.width > right) {
+ rect.width = Math.max (0, right - rect.x);
}
}
- return new Rectangle (rect.x + border, rect.y + (headerHeight == 0 ? border : headerHeight), rect.width + 1, rect.height + 1);
+ return new Rectangle (rect.x, rect.y, rect.width + 1, rect.height + 1);
}
/**
@@ -718,23 +686,7 @@ public Rectangle getImageBounds (int index) {
OS.gtk_cell_renderer_get_size (pixbufRenderer, parentHandle, null, null, null, w, null);
rect.width = w [0];
}
-
- /*
- * In the horizontal direction, the origin of the bin window is
- * not the same as the origin of the scrolled handle.
- * The method gtk_tree_view_get_cell_area returns the
- * x coordinate relative to the bin window. In order to
- * get the coordinates relative to the top left corner
- * of the client area, we need to account for the
- * horizontal scroll adjustment.
- */
- int[] wx = new int[1];
- OS.gtk_tree_view_tree_to_widget_coords(parentHandle, rect.x, 0, wx, null);
- rect.x = wx[0];
-
- int border = parent.getBorderWidth ();
- int headerHeight = parent.getHeaderHeight ();
- return new Rectangle (rect.x + (index == 0 ? 0 : border), rect.y + (headerHeight == 0 ? border : headerHeight), rect.width, rect.height + 1);
+ return new Rectangle (rect.x, rect.y, rect.width, rect.height + 1);
}
/**