diff options
author | Benjamin Barenblat <bbarenblat@gmail.com> | 2021-12-22 16:45:15 -0500 |
---|---|---|
committer | Benjamin Barenblat <bbarenblat@gmail.com> | 2021-12-22 16:45:15 -0500 |
commit | 84f306bce157b974a8b540487a316d28a3416323 (patch) | |
tree | 7d74588a3b139259d0af2cc1b7f47d4ff951d4e2 | |
parent | 746f3d8ddcc6303f3f5725d5b3ad847b9e4fd7b2 (diff) |
Make icon an SVG
It’s still saved as a PNG in the extension package, but rendering it
from an SVG produces a better-looking result and is easier to work
with.
-rw-r--r-- | build.ninja | 8 | ||||
-rwxr-xr-x | gen/png | 4 | ||||
-rw-r--r-- | icon.svg | 18 | ||||
-rw-r--r-- | icon128.png | bin | 626 -> 0 bytes | |||
-rw-r--r-- | icon48.png | bin | 253 -> 0 bytes |
5 files changed, 25 insertions, 5 deletions
diff --git a/build.ninja b/build.ninja index 63813aa..559100a 100644 --- a/build.ninja +++ b/build.ninja @@ -15,7 +15,7 @@ name = disable_keyboard_shortcuts rule generate_png - command = gen/png $in $out 2>/dev/null + command = gen/png $in $width $out 2>/dev/null description = Generating $out rule minify_js @@ -32,8 +32,10 @@ rule zip build $name/background.js: minify_js background.js build $name/manifest.json: minify_json manifest.json -build $name/icon128.png: generate_png icon128.png -build $name/icon48.png: generate_png icon128.png +build $name/icon128.png: generate_png icon.svg + width = 128 +build $name/icon48.png: generate_png icon.svg + width = 48 build $name.zip: zip $name/background.js $name/manifest.json $name/icon128.png $ $name/icon48.png @@ -15,5 +15,5 @@ set -eu -cp "$1" "$2" -optipng -o7 "$2" +inkscape -w "$2" -h "$2" -o "$3" "$1" +optipng -o7 "$3" diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..f30b96a --- /dev/null +++ b/icon.svg @@ -0,0 +1,18 @@ +<!-- Copyright 2021 Benjamin Barenblat + +Licensed under the Apache License, Version 2.0 (the "License"); you may not +use this file except in compliance with the License. You may obtain a copy of +the License at + + https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations under +the License. --> + +<svg version="1.1" width="128" height="128" xmlns="http://www.w3.org/2000/svg"> + <circle cx="50%" cy="50%" r="53.5" fill-opacity="0" stroke="black" + stroke-width="5" /> +</svg> diff --git a/icon128.png b/icon128.png Binary files differdeleted file mode 100644 index 0021ccf..0000000 --- a/icon128.png +++ /dev/null diff --git a/icon48.png b/icon48.png Binary files differdeleted file mode 100644 index 5158189..0000000 --- a/icon48.png +++ /dev/null |