javamanager/javainstaller/installerui/javasrc/com/nokia/mj/impl/installer/ui/eswt/InstallerUiEswt.java
changeset 79 2f468c1958d0
parent 61 bf7ee68962da
equal deleted inserted replaced
76:4ad59aaee882 79:2f468c1958d0
  1150         }
  1150         }
  1151         try
  1151         try
  1152         {
  1152         {
  1153             long startTime = System.currentTimeMillis();
  1153             long startTime = System.currentTimeMillis();
  1154             
  1154             
       
  1155             int maxWidth = DisplayExtension.getBestImageWidth(DisplayExtension.LIST_ELEMENT);
       
  1156             int maxHeight = DisplayExtension.getBestImageHeight(DisplayExtension.LIST_ELEMENT);
       
  1157             
       
  1158             aDisplay.setData("org.eclipse.swt.internal.image.loadSize", new Point(maxWidth, maxHeight));
  1155             Image image = new Image(aDisplay, aInputStream);
  1159             Image image = new Image(aDisplay, aInputStream);
       
  1160             
  1156             if (aScaleImage)
  1161             if (aScaleImage)
  1157             {
  1162             {
  1158                 int maxWidth = DisplayExtension.getBestImageWidth(DisplayExtension.LIST_ELEMENT);
       
  1159                 int maxHeight = DisplayExtension.getBestImageHeight(DisplayExtension.LIST_ELEMENT);
       
  1160                 Rectangle rect = image.getBounds();
  1163                 Rectangle rect = image.getBounds();
  1161                 if (maxWidth != rect.width || maxHeight != rect.height)
  1164                 if (maxWidth != rect.width || maxHeight != rect.height)
  1162                 {
  1165                 {
  1163                     // Copy and scale natively preserving the aspect ratio
  1166                     // Copy and scale natively preserving the aspect ratio
  1164                     result = ImageUtil.scaleImage(aDisplay, image, new Point(maxWidth, maxHeight), true);
  1167                     result = ImageUtil.scaleImage(aDisplay, image, new Point(maxWidth, maxHeight), true);