Bug 378255 - A single Job makes scrollbars appear on the Progress View

Change-Id: Ia04da35ff5fadf1b450a12aa7afb4f2edd1b684a
Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
diff --git a/bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/DetailedProgressViewer.java b/bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/DetailedProgressViewer.java
index a378274..b084c82 100644
--- a/bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/DetailedProgressViewer.java
+++ b/bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/DetailedProgressViewer.java
@@ -360,7 +360,8 @@
 
 		// Update the minimum size
 		Point size = control.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-		size.x += IDialogConstants.HORIZONTAL_SPACING;
+		// no horizontal size because we do not want to scroll horizontal
+		size.x = 0;
 		size.y += IDialogConstants.VERTICAL_SPACING;
 
 		scrolled.setMinSize(size);
diff --git a/bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/ProgressInfoItem.java b/bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/ProgressInfoItem.java
index 206edb6..96317ae 100644
--- a/bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/ProgressInfoItem.java
+++ b/bundles/org.eclipse.e4.ui.progress/src/org/eclipse/e4/ui/progress/internal/ProgressInfoItem.java
@@ -704,8 +704,6 @@
 					IDialogConstants.VERTICAL_SPACING);
 			linkData.left = new FormAttachment(progressBar, 0, SWT.LEFT);
 			linkData.right = new FormAttachment(progressBar, 0, SWT.RIGHT);
-			// Give an initial value so as to constrain the link shortening
-			linkData.width = 20;
 
 			taskEntries.get(0).setLayoutData(linkData);
 		}
@@ -731,16 +729,12 @@
 						IDialogConstants.VERTICAL_SPACING);
 				linkData.left = new FormAttachment(top, 0, SWT.LEFT);
 				linkData.right = new FormAttachment(top, 0, SWT.RIGHT);
-				// Give an initial value so as to constrain the link shortening
-				linkData.width = 20;
 			} else {
 				Link previous = taskEntries.get(index - 1);
 				linkData.top = new FormAttachment(previous,
 						IDialogConstants.VERTICAL_SPACING);
 				linkData.left = new FormAttachment(previous, 0, SWT.LEFT);
 				linkData.right = new FormAttachment(previous, 0, SWT.RIGHT);
-				// Give an initial value so as to constrain the link shortening
-				linkData.width = 20;
 			}
 
 			link.setLayoutData(linkData);
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java
index 27d4ef5..06a1bea 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/DetailedProgressViewer.java
@@ -474,7 +474,8 @@
 	 */
 	private void updateSize() {
 		Point size = control.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-		size.x += IDialogConstants.HORIZONTAL_SPACING;
+		// no horizontal size because we do not want to scroll horizontal
+		size.x = 0;
 		size.y += IDialogConstants.VERTICAL_SPACING;
 		scrolled.setMinSize(size);
 	}
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java
index 2d06827..99b0c81 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/ProgressInfoItem.java
@@ -678,8 +678,6 @@
 			linkData.top = new FormAttachment(progressBar, IDialogConstants.VERTICAL_SPACING);
 			linkData.left = new FormAttachment(progressBar, 0, SWT.LEFT);
 			linkData.right = new FormAttachment(progressBar, 0, SWT.RIGHT);
-			// Give an initial value so as to constrain the link shortening
-			linkData.width = 20;
 
 			taskEntries.get(0).setLayoutData(linkData);
 		}
@@ -703,15 +701,11 @@
 				linkData.top = new FormAttachment(top, IDialogConstants.VERTICAL_SPACING);
 				linkData.left = new FormAttachment(top, 0, SWT.LEFT);
 				linkData.right = new FormAttachment(top, 0, SWT.RIGHT);
-				// Give an initial value so as to constrain the link shortening
-				linkData.width = 20;
 			} else {
 				Link previous = taskEntries.get(index - 1);
 				linkData.top = new FormAttachment(previous, IDialogConstants.VERTICAL_SPACING);
 				linkData.left = new FormAttachment(previous, 0, SWT.LEFT);
 				linkData.right = new FormAttachment(previous, 0, SWT.RIGHT);
-				// Give an initial value so as to constrain the link shortening
-				linkData.width = 20;
 			}
 
 			link.setLayoutData(linkData);