[jbosstools-commits] JBoss Tools SVN: r41470 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Sun May 27 16:58:08 EDT 2012


Author: snjeza
Date: 2012-05-27 16:58:08 -0400 (Sun, 27 May 2012)
New Revision: 41470

Modified:
   trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-10652 - Quickstarts "carousel" idea to scale the list of quickstarts

Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java	2012-05-27 18:52:31 UTC (rev 41469)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java	2012-05-27 20:58:08 UTC (rev 41470)
@@ -21,7 +21,6 @@
 import java.util.Set;
 
 import org.apache.commons.lang.StringEscapeUtils;
-import org.eclipse.core.resources.WorkspaceJob;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IConfigurationElement;
 import org.eclipse.core.runtime.IContributor;
@@ -1078,18 +1077,14 @@
 			return;
 		}
 		Point size;
-		//if (Platform.OS_MACOSX.equals(Platform.getOS())) {
-			size = form.getSize();
-			size.y = form.getBody().getSize().y;
-		//} else {
-		//	size = form.getBody().getSize();
-		//}
+		size = form.getSize();
+		size.y = form.getBody().getSize().y;
 		if (!force && size.equals(oldSize)) {
 			return;
 		}
 		oldSize = size;
 		GridData gd;
-		int widthHint = size.x/2 - 40;
+		int widthHint = size.x/2 - 20;
 		gd = (GridData) newsSection.getLayoutData();
 		if (newsSection.isExpanded()) {
 			if (blogsSection.isExpanded()) {
@@ -1116,46 +1111,36 @@
 		
 		gd.widthHint = widthHint;
 		gd.grabExcessVerticalSpace = false;
-		
-		gd = (GridData) tutorialsSection.getLayoutData();
-		//gridData.heightHint = size.y - 40;
-		gd.widthHint = widthHint;
-		gd.grabExcessVerticalSpace = false;
-		tutorialPageBook.pack();
-		//computedSize = tutorialPageBook.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-		//tutorialsSection.setSize(widthHint, computedSize.y);
-		
+				
 		gd = (GridData) documentationSection.getLayoutData();
 		//gridData.heightHint = size.y - 40;
 		gd.widthHint = widthHint;
 		gd.grabExcessVerticalSpace = false;
-		//computedSize = documentationSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-		//documentationSection.setSize(widthHint, computedSize.y);
 		
 		gd = (GridData) settingsSection.getLayoutData();
 		gd.widthHint = widthHint;
 		gd.grabExcessVerticalSpace = false;
-		//computedSize = settingsSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-		//settingsSection.setSize(widthHint, computedSize.y);
 		
 		gd = (GridData) projectsSection.getLayoutData();
 		//gridData.heightHint = size.y - 40;
 		gd.widthHint = widthHint;
 		gd.grabExcessVerticalSpace = false;
-		//computedSize = projectsSection.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-		//projectsSection.setSize(widthHint, computedSize.y);
 		
-		blogsScrollComposite.setMinSize(widthHint, size.y - 55);
-		newsScrollComposite.setMinSize(widthHint, size.y - 55);
+		gd = (GridData) tutorialsSection.getLayoutData();
+		Point computedSize = tutorialPageBook.computeSize(widthHint, SWT.DEFAULT);
 		
-		Point computedSize = tutorialPageBook.computeSize(SWT.DEFAULT, SWT.DEFAULT);
-		int y = computedSize.y;
-		if (y > 100) {
-			y = 100;
+		if (computedSize.y > (size.y/3)) {
+			gd.heightHint = size.y/3;
+		} else {
+			gd.heightHint = SWT.DEFAULT;
 		}
+		gd.widthHint = widthHint;
+		gd.grabExcessVerticalSpace = false;
 		
-		tutorialScrollComposite.setMinSize(widthHint, y);
+		computedSize = tutorialPageBook.computeSize(widthHint, SWT.DEFAULT);
 		
+		tutorialScrollComposite.setMinSize(widthHint - 20, computedSize.y);
+		
 		recomputeScrollComposite(blogsScrollComposite, blogsPageBook);
 		recomputeScrollComposite(newsScrollComposite, newsPageBook);
 		



More information about the jbosstools-commits mailing list