aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Hufmann2012-11-29 11:49:00 (EST)
committerBernd Hufmann2012-11-29 15:29:13 (EST)
commit48212066c25ab1556763d85708cbd7e85bf1dcac (patch)
tree1b9b98f7e5a4f11792b959b5302589511757d601
parentade001b01956f769a4468b4419ccaec6e7d85eaf (diff)
downloadorg.eclipse.linuxtools-48212066c25ab1556763d85708cbd7e85bf1dcac.zip
org.eclipse.linuxtools-48212066c25ab1556763d85708cbd7e85bf1dcac.tar.gz
org.eclipse.linuxtools-48212066c25ab1556763d85708cbd7e85bf1dcac.tar.bz2
Fix for column width problem in Linuxrefs/changes/33/8933/3
Change-Id: Ib439b88740fd8585fa32a8ebaf263bb41c031817 Reviewed-on: https://git.eclipse.org/r/8933 Tested-by: Hudson CI Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com> IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java
index 46ec27f..9d852e7 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/viewers/events/TmfEventsTable.java
@@ -1093,8 +1093,8 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS
* @since 1.1
*/
protected void applyFilter(ITmfFilter filter) {
- stopFilterThread();
- stopSearchThread();
+ stopFilterThread();
+ stopSearchThread();
fFilterMatchCount = 0;
fFilterCheckCount = 0;
fCache.applyFilter(filter);
@@ -1465,9 +1465,20 @@ public class TmfEventsTable extends TmfComponent implements IGotoMarker, IColorS
if (fPackDone) {
return;
}
- for (final TableColumn column : fTable.getColumns()) {
+ boolean isLinux = System.getProperty("os.name").contains("Linux") ? true : false; //$NON-NLS-1$ //$NON-NLS-2$
+
+ TableColumn tableColumns[] = fTable.getColumns();
+ for (int i = 0; i < tableColumns.length; i++) {
+ final TableColumn column = tableColumns[i];
final int headerWidth = column.getWidth();
column.pack();
+ // Workaround for Linux which doesn't consider the image width of
+ // search/filter row in TableColumn.pack() after having executed
+ // TableItem.setImage((Image)null) for other rows than search/filter row.
+ if (isLinux && (i == 0)) {
+ column.setWidth(column.getWidth() + SEARCH_IMAGE.getBounds().width);
+ }
+
if (column.getWidth() < headerWidth) {
column.setWidth(headerWidth);
}