Improve ui icons

This commit is contained in:
Loic Guegan 2023-06-03 15:44:46 +02:00
parent 9bc06b941a
commit 8b37da88aa
19 changed files with 536 additions and 2742 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

View file

@ -0,0 +1,4 @@
UI icons sources
=====
Icons used in UI mainly come from [iconoir](https://iconoir.com/)

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="#000000"><path d="M9.019 9A6.5 6.5 0 1115 14.981M8.5 22a6.5 6.5 0 110-13 6.5 6.5 0 010 13zM22 17a3 3 0 01-3 3h-2m0 0l2-2m-2 2l2 2M2 7a3 3 0 013-3h2m0 0L5 6m2-2L5 2" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>

After

Width:  |  Height:  |  Size: 424 B

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="#000000"><path d="M19.5 16l-2.475-3.396M12 17.5V14M4.5 16l2.469-3.388M3 8c3.6 8 14.4 8 18 0" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>

After

Width:  |  Height:  |  Size: 352 B

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="#000000"><path d="M8 11h3m3 0h-3m0 0V8m0 3v3M17 17l4 4M3 11a8 8 0 1016 0 8 8 0 00-16 0z" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>

After

Width:  |  Height:  |  Size: 348 B

View file

@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" stroke-width="1.5" fill="none" xmlns="http://www.w3.org/2000/svg" color="#000000"><path d="M17 17l4 4M3 11a8 8 0 1016 0 8 8 0 00-16 0zM8 11h6" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

View file

@ -5,12 +5,6 @@
ressources=$(cat <<-EndOfResources
assets/boards/chesscom_8bits.png
assets/pieces/cburnett.png
assets/icons/hide.png
assets/icons/mat.png
assets/icons/ochess.png
assets/icons/swap.png
assets/icons/zoomin.png
assets/icons/zoomout.png
EndOfResources
)
###############################
@ -18,6 +12,7 @@ EndOfResources
set -e
wai=$(dirname $(readlink -f "$0")) # Current script directory
dst="${wai}/../src/binres/binary_data.hpp"
ui_icons_width=24
# Binary to C headers
# $1 is the resource file and $2 the variable name to use in the C code
@ -25,9 +20,19 @@ bin2c () {
xxd -n "$2" -i "$1"
}
# Generate ui icons png from svg
rm -f "${wai}"/assets/icons/ui/*.png # Clear previous data
for svg in $(find ${wai}/assets/icons/ui -name "*.svg")
do
ext="${svg##*.}"
name="$(basename $svg .${ext})"
echo "Generating png for ${name}.${ext}..."
inkscape --export-type png --export-filename "${wai}/assets/icons/ui/ui-${name}.png" -w "${ui_icons_width}" "${svg}"
done
# Generate headers
echo -n > "$dst"
for res in $ressources
for res in $ressources $(find ${wai}/assets/icons/ -name "*.png")
do
ext="${res##*.}"
name="$(basename $res .${ext})"