keepassxc/share/icons/minify.sh
Jonathan White 90d5372813
Replace database icons with SVG's
Original source of icons is the icon8 library (http://icons8.com/c/flat-color-icons) and Paomedia (https://github.com/paomedia/small-n-flat). All icons used are licensed MIT or CC0; annotated in COPYING.

* Closes #4071

* Increase default size of database icons to 24px and entry preview panel to 48px
* Add shell script to assemble the database icons

* Use QIcon to seamlessly support High DPI displays and pixmap caching
* Add badge support for KeeShare groups and expired entries.
* Guard against use of QPixmap::fromImage without a GUI

* Add SVG minify and improve `make icons`

Co-authored-by: Wolfram Rösler <wolfram@roesler-ac.de>
2020-05-29 10:00:32 -04:00

22 lines
601 B
Bash

#!/usr/bin/env bash
NC='\033[0m'
YELLOW='\033[0;33m'
# Build desktop icon
echo "Creating desktop icon PNG..."
if command -v "inkscape" &> /dev/null; then
inkscape -z -w 256 -h 256 icons/application/scalable/apps/keepassxc.svg -e icons/application/256x256/apps/keepassxc.png
else
echo -e "${YELLOW}Could not find inkscape; keepassxc.png not built!${NC}"
fi
# Minify SVG's
echo "Minifying SVG's..."
minify -o icons/badges --match=.svg icons/badges
minify -o icons/database --match=.svg icons/database
# Crush PNG's
echo "Crushing PNG's..."
find "." -iname '*png' -exec pngcrush -ow -brute {} \;