# HG changeset patch # User dadubrow # Date 1284676177 18000 # Node ID 42a3ddebe5837b28f44d29301c817b9b5f85182a # Parent 8ca82bbe19735671ce4d18beaba0f779ca410043 Some portal tweaks diff -r 8ca82bbe1973 -r 42a3ddebe583 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/NavigationBar.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/NavigationBar.java Thu Sep 16 16:09:17 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/NavigationBar.java Thu Sep 16 17:29:37 2010 -0500 @@ -19,8 +19,6 @@ import java.util.LinkedHashMap; import java.util.Map; -import org.eclipse.jface.layout.RowDataFactory; -import org.eclipse.jface.layout.RowLayoutFactory; import org.eclipse.jface.resource.FontDescriptor; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.swt.SWT; @@ -29,6 +27,7 @@ import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; @@ -56,7 +55,11 @@ parent.getDisplay().getSystemColor(SWT.COLOR_WHITE)); this.portalEditor = portalEditor; buttonToPageMap = new LinkedHashMap(); - RowLayoutFactory.swtDefaults().margins(3, 3).wrap(false).applyTo(this); + FillLayout layout = new FillLayout(SWT.HORIZONTAL); + layout.spacing = 5; + layout.marginHeight = 5; + layout.marginWidth = 5; + setLayout(layout); listener = new ButtonListener(); selectedButtonFont = JFaceResources.getHeaderFont(); FontData[] fontData = selectedButtonFont.getFontData(); @@ -79,7 +82,6 @@ b.setText(page.getTitle()); b.setImage(portalEditor.createImage(page.getImageDescriptor(), 16, 16)); b.addSelectionListener(listener); - RowDataFactory.swtDefaults().applyTo(b); buttonToPageMap.put(b, page); } @@ -94,5 +96,4 @@ button.setFont(selectedButtonFont); layout(); } - } \ No newline at end of file diff -r 8ca82bbe1973 -r 42a3ddebe583 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalEditor.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalEditor.java Thu Sep 16 16:09:17 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalEditor.java Thu Sep 16 17:29:37 2010 -0500 @@ -243,10 +243,10 @@ // create background backgroundParent = new Composite(parent, SWT.NONE); applyBG(backgroundParent); - GridLayoutFactory.fillDefaults().applyTo(backgroundParent); + GridLayoutFactory.fillDefaults().margins(10, 0).applyTo(backgroundParent); // create top navigation bar navigationBar = createNavigationBar(backgroundParent); - GridDataFactory.swtDefaults().grab(true, false).align(SWT.CENTER, SWT.TOP).indent(10, 10).applyTo(navigationBar); + GridDataFactory.swtDefaults().grab(true, false).align(SWT.FILL, SWT.TOP).indent(0, 10).applyTo(navigationBar); // create stack composite createStackComposite(backgroundParent, navigationBar); return backgroundParent; diff -r 8ca82bbe1973 -r 42a3ddebe583 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalPage.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalPage.java Thu Sep 16 16:09:17 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/PortalPage.java Thu Sep 16 17:29:37 2010 -0500 @@ -154,7 +154,7 @@ for (Layer layer : layers) { Composite layerComposite = new SharedBackgroundComposite(pageComposite, backgroundParent); GridDataFactory.fillDefaults().grab(true, true).applyTo(layerComposite); - GridLayoutFactory.fillDefaults().numColumns(2).spacing(20, 0).extendedMargins(20, 20, 20, 0).applyTo(layerComposite); + GridLayoutFactory.fillDefaults().numColumns(2).spacing(10, 0).extendedMargins(0, 0, 10, 0).applyTo(layerComposite); createTaskBarControls(portalEditor, layerComposite, layer.getLayer()); createMainControl(portalEditor, layerComposite, layer.getLayer()); layer.setControl(layerComposite); @@ -167,7 +167,7 @@ GridLayoutFactory.fillDefaults().applyTo(taskComposite); GridDataFactory.fillDefaults().grab(false, true).applyTo(taskComposite); TaskBar taskBar = new TaskBar(taskComposite, backgroundParent, this); - GridDataFactory.fillDefaults().minSize(150, SWT.DEFAULT).grab(true, false).indent(0, 0).applyTo(taskBar); + GridDataFactory.fillDefaults().minSize(120, SWT.DEFAULT).grab(true, false).indent(0, 0).applyTo(taskBar); pageTaskBars.add(taskBar); ActionUIUpdater updater = new ActionUIUpdater(); createCommandBars(backgroundParent, taskComposite, updater, diff -r 8ca82bbe1973 -r 42a3ddebe583 core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/SharedBackgroundComposite.java --- a/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/SharedBackgroundComposite.java Thu Sep 16 16:09:17 2010 -0500 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/SharedBackgroundComposite.java Thu Sep 16 17:29:37 2010 -0500 @@ -62,9 +62,4 @@ // gc.drawRectangle(1, 1, width - 2, height - 2); } - @Override - public void layout() { - super.layout(); - pack(); - } }