diff options
| author | Ian Pun | 2016-08-12 15:17:12 +0000 |
|---|---|---|
| committer | Eric Williams | 2016-08-12 15:24:33 +0000 |
| commit | 93cbea04d4686273697e48e72ea5b7546547f7c0 (patch) | |
| tree | 75331e2ddccf6b5dea2820ef12ebb8503b39a820 | |
| parent | 4801a36878b1a75942d1521e3be947bd0a711946 (diff) | |
| download | eclipse.platform.swt-93cbea04d4686273697e48e72ea5b7546547f7c0.tar.gz eclipse.platform.swt-93cbea04d4686273697e48e72ea5b7546547f7c0.tar.xz eclipse.platform.swt-93cbea04d4686273697e48e72ea5b7546547f7c0.zip | |
Bug 94549 - New Java class wizard "Interfaces" table displays junk
Using Billy Biggs' patch to fix positioning of the text editing area.
The patch takes account for the cell size in order to get the correct
height for the tree for the text editing widget to spawn correctly.
Jface seems to call editElement() even when the table does not have
focus, causing sizing issues.
Change-Id: I075d634c73c1b92c28f8f4854c5e35a8ce6a0acd
Signed-off-by: Ian Pun <ipun@redhat.com>
| -rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java | 4 |
1 files changed, 4 insertions, 0 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 5fbcf387c6..c4c2c640aa 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 @@ -387,9 +387,13 @@ Rectangle getBoundsInPixels (int index) { if (column == 0) return new Rectangle (0, 0, 0, 0); long /*int*/ path = OS.gtk_tree_model_get_path (parent.modelHandle, handle); OS.gtk_widget_realize (parentHandle); + OS.gtk_tree_view_column_cell_set_cell_data (column, parent.modelHandle, handle, false, false); GdkRectangle rect = new GdkRectangle (); OS.gtk_tree_view_get_cell_area (parentHandle, path, column, rect); OS.gtk_tree_path_free (path); + int [] cw = new int [1], ch = new int [1]; + OS.gtk_tree_view_column_cell_get_size (column, null, null, null, cw, ch); + rect.height = ch [0]; if ((parent.getStyle () & SWT.MIRRORED) != 0) rect.x = parent.getClientWidth () - rect.width - rect.x; if (index == 0 && (parent.style & SWT.CHECK) != 0) { |
