Changeset 1254

Show
Ignore:
Timestamp:
11/07/07 17:28:10 (1 year ago)
Author:
koshi
Message:

#197 improved icon scale.
comment out search view.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.jalcedo.generator/trunk/org.jalcedo.generator.icon.ui/src/org/jalcedo/generator/icon/ui/internal/property/IconPropertyPage.java

    r1233 r1254  
    324324                            e.printStackTrace(); 
    325325                        } 
    326                         imageRegistry.put(icon.getPath(), ImageDescriptor.createFromURL(url)); 
     326                        imageRegistry.put(icon.getPath(), ImageDescriptor.createFromImageData( 
     327                                ImageDescriptor.createFromURL(url).getImageData().scaledTo(16,16))); 
    327328                    } 
    328329                    return imageRegistry.get(icon.getPath()); 
  • org.jalcedo.generator/trunk/org.jalcedo.generator.icon.ui/src/org/jalcedo/generator/icon/ui/internal/wizard/IconEditWizardPage.java

    r1234 r1254  
    2323import org.eclipse.core.runtime.FileLocator; 
    2424import org.eclipse.jface.dialogs.MessageDialog; 
     25import org.eclipse.jface.resource.ImageDescriptor; 
    2526import org.eclipse.jface.resource.ImageRegistry; 
    2627import org.eclipse.jface.viewers.ArrayContentProvider; 
     
    156157        item.setControl(createExplorerArea(folder)); 
    157158         
    158       item = new CTabItem(folder, SWT.NONE); 
    159       item.setText(Messages.getString("IconEditWizardPage.searchTab")); //$NON-NLS-1$ 
    160       item.setImage(Activator.getDefault().getImageRegistry().get(Activator.ICON_SEARCH)); 
    161       item.setControl(createSearchArea(folder)); 
     159//        item = new CTabItem(folder, SWT.NONE); 
     160//        item.setText(Messages.getString("IconEditWizardPage.searchTab")); //$NON-NLS-1$ 
     161//        item.setImage(Activator.getDefault().getImageRegistry().get(Activator.ICON_SEARCH)); 
     162//        item.setControl(createSearchArea(folder)); 
    162163         
    163164        return container; 
     
    354355     * @return 
    355356     */ 
    356   private Control createSearchArea(Composite parent) { 
    357       Composite container = new Composite(parent, SWT.NONE); 
    358       GridLayout layout = new GridLayout(); 
    359       layout.marginWidth = 0; 
    360       layout.marginHeight = 0; 
    361       container.setLayout(layout); 
    362       container.setLayoutData(new GridData(GridData.FILL_BOTH)); 
    363        
    364       return container; 
    365   } 
     357//    private Control createSearchArea(Composite parent) { 
     358//        Composite container = new Composite(parent, SWT.NONE); 
     359//        GridLayout layout = new GridLayout(); 
     360//        layout.marginWidth = 0; 
     361//        layout.marginHeight = 0; 
     362//        container.setLayout(layout); 
     363//        container.setLayoutData(new GridData(GridData.FILL_BOTH)); 
     364//         
     365//        return container; 
     366//    } 
    366367     
    367368    /** 
     
    464465                Icon icon = (Icon) element; 
    465466                if(imageRegistry.get(icon.getPath()) == null){ 
    466                     imageRegistry.put(icon.getPath(), AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, icon.getPath())); 
     467                    imageRegistry.put(icon.getPath(), ImageDescriptor.createFromImageData( 
     468                            (AbstractUIPlugin.imageDescriptorFromPlugin( 
     469                                    Activator.PLUGIN_ID, icon.getPath()).getImageData().scaledTo(16,16)))); 
    467470                } 
    468471                return imageRegistry.get(icon.getPath()); 
     
    608611        private Image getImage(Icon icon){ 
    609612            if(imageRegistry.get(icon.getPath()) == null){ 
    610                 imageRegistry.put(icon.getPath(), AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, icon.getPath())); 
     613                imageRegistry.put(icon.getPath(), ImageDescriptor.createFromImageData( 
     614                        (AbstractUIPlugin.imageDescriptorFromPlugin( 
     615                                Activator.PLUGIN_ID, icon.getPath()).getImageData().scaledTo(16,16)))); 
    611616            } 
    612617            return imageRegistry.get(icon.getPath());