Skip to content

Commit

Permalink
feat: standardise icons (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwmkerr authored Apr 25, 2019
1 parent ee54f5f commit 9c65dcf
Show file tree
Hide file tree
Showing 66 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ This would produce output like the below image:

This is a useful trick when you are creating things like internal QA versions of your app, where you might want to show a version number or other label in the icon itself.

To label adaptive icons, simply run the `label` command against the _foregroud_ adaptive icon image.

### Adaptive Icons

Support for [Adaptive Icons for Android](https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive) is being introduced. This will happen in stages and should be considered an 'alpha' feature until otherwise noted.
Expand Down
Binary file modified assets/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/banner.psd
Binary file not shown.
Binary file removed assets/icon.psd
Binary file not shown.
Binary file added assets/icon.templates.psd
Binary file not shown.
Binary file modified assets/label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/label.psd
Binary file not shown.
Binary file removed assets/logo.psd
Binary file not shown.
2 changes: 1 addition & 1 deletion bin/app-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ program
const inputBackground = path.resolve(__dirname, '../src/init/icon.background.template.png');
const inputForeground = path.resolve(__dirname, '../src/init/icon.foreground.template.png');
init(inputBackground, './icon.background.png')
.then(() => init(inputForeground, './icon.foreground.png'))
.then(() => init(inputForeground, './icon.foreground.png', { caption }))
.then(() => {
console.log(`Created icon '${chalk.green('icon.background.png')}'`);
console.log(`Created icon '${chalk.green('icon.foreground.png')}'`);
Expand Down
Binary file modified src/init/icon.template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/init/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function init(template, output, options) {
const command = `convert \
-background "rgba(0,0,0,0)" -fill white \
-gravity center -size ${w}x${h} \
caption:"${caption}" \
-stroke black -strokewidth 2 caption:"${caption}" \
${template} +swap -composite ${output}`;
return imagemagickCli.exec(command);
});
Expand Down
4 changes: 2 additions & 2 deletions src/init/init.specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('init', () => {
return init(template, output)
.then(() => compareImages(output, reference))
.then((difference) => {
expect(difference).to.be.below(2.5, 'Generated image is below accepted similarly threshold');
expect(difference).to.be.below(5, 'Generated image is below accepted similarly threshold');
});
});

Expand All @@ -21,7 +21,7 @@ describe('init', () => {
return init(template, output, { caption: 'Test' })
.then(() => compareImages(output, reference))
.then((difference) => {
expect(difference).to.be.below(2.5, 'Generated image is below accepted similarly threshold');
expect(difference).to.be.below(5, 'Generated image is below accepted similarly threshold');
});
});
});
Binary file modified src/init/test-images/init-reference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/init/test-images/init-with-caption-reference.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9c65dcf

Please sign in to comment.