Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Revert "[Bug 944026] Make sure installed apps are the native size [r=…
Browse files Browse the repository at this point in the history
…amirn]"

This reverts commit ea7938e.
  • Loading branch information
evyatron committed Dec 2, 2013
1 parent 4fd13a4 commit 4f36cf1
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions apps/homescreen/everything.me/modules/Results/Result.js
Expand Up @@ -83,6 +83,7 @@
Evme.Utils.blobToDataURI(iconObj, function onDataReady(src) {
setImageSrc(src);
});

} else {
var src = Evme.Utils.formatImageData(iconObj);
setImageSrc(src);
Expand All @@ -106,13 +107,13 @@

// @default
this.onAppIconLoad = function onAppIconLoad() {
var canvas = self.initIcon(Evme.Utils.getOSIconSize()),
// use OS icon rendering
var iconCanvas = Icon.prototype.createCanvas(image),
canvas = self.initIcon(iconCanvas.height),
context = canvas.getContext('2d');

context.drawImage(image,
(canvas.width - image.width) / 2,
(canvas.height - image.height) / 2);

context.drawImage(iconCanvas, (TEXT_WIDTH - iconCanvas.width) / 2, 0);
self.iconPostRendering(iconCanvas);
self.finalizeIcon(canvas);
self.setIconSrc(image.src);
};
Expand All @@ -128,6 +129,11 @@
return canvas;
};

// @default
this.iconPostRendering = function iconPostRendering(iconCanvas) {
// do nothing
};

// @default
this.finalizeIcon = function finalizeIcon(canvas) {
var icon = self.elIcon,
Expand Down

0 comments on commit 4f36cf1

Please sign in to comment.