# HG changeset patch # User dadubrow # Date 1284753488 18000 # Node ID c984a53977bdcc1c6e7601b85518ee28de5c4edb # Parent f375c7305c9d420da2ff6e16a48d4d77ea87e61e More tweaks - scaling icons will be replaced with actual 32x32 icons diff -r f375c7305c9d -r c984a53977bd 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 Fri Sep 17 13:30:29 2010 -0600 +++ b/core/com.nokia.carbide.discovery.ui/src/com/nokia/carbide/internal/discovery/ui/editor/NavigationBar.java Fri Sep 17 14:58:08 2010 -0500 @@ -33,9 +33,6 @@ class NavigationBar extends RoundedCornerComposite { - private PortalEditor portalEditor; - - private final class ButtonListener extends SelectionAdapter { @Override public void widgetSelected(SelectionEvent e) { @@ -44,21 +41,21 @@ } } + private static final int BUTTON_SPACING = -2; + private PortalEditor portalEditor; private Map buttonToPageMap; private SelectionListener listener; private Font buttonFont; private Font selectedButtonFont; NavigationBar(PortalEditor portalEditor, Composite parent) { - super(parent, portalEditor.getBackgroundParent(), - parent.getDisplay().getSystemColor(SWT.COLOR_BLACK), - parent.getDisplay().getSystemColor(SWT.COLOR_WHITE)); + super(parent, portalEditor.getBackgroundParent(), null, null); this.portalEditor = portalEditor; buttonToPageMap = new LinkedHashMap(); FillLayout layout = new FillLayout(SWT.HORIZONTAL); - layout.spacing = 5; - layout.marginHeight = 5; - layout.marginWidth = 5; + layout.spacing = BUTTON_SPACING; + layout.marginHeight = BUTTON_SPACING; + layout.marginWidth = BUTTON_SPACING; setLayout(layout); listener = new ButtonListener(); selectedButtonFont = JFaceResources.getHeaderFont(); @@ -77,10 +74,10 @@ } public void addNavButton(NavigationBar bar, PortalPage page) { - Button b = new Button(bar, SWT.TOGGLE | SWT.FLAT); + Button b = new Button(bar, SWT.LEFT | SWT.TOGGLE); b.setFont(buttonFont); b.setText(page.getTitle()); - b.setImage(portalEditor.createImage(page.getImageDescriptor(), 16, 16)); + b.setImage(portalEditor.createImage(page.getImageDescriptor(), 32, 32)); b.addSelectionListener(listener); buttonToPageMap.put(b, page); }