fix: size on linux

This commit is contained in:
Baptiste Augrain 2023-04-13 11:12:12 +02:00
parent 8f7acfc2bf
commit d926d66336
174 changed files with 68 additions and 23 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.goutputstream-*
icon*.png
icon*.svg

View File

@ -11,6 +11,13 @@ set -e
check_programs "icns2png" "composite" "convert" "png2icns" "icotool" "rsvg-convert" "bc" "pastel"
build_icon() { # {{{
echo "- ${ICON_NAME}/${BG_NAME}/${COLOR_NAME}: ${BG_COLOR_SET}"
# echo "COLOR_PRIMARY: ${COLOR_PRIMARY}"
# echo "COLOR_MEDIAN1: ${COLOR_MEDIAN1}"
# echo "COLOR_MEDIAN2: ${COLOR_MEDIAN2}"
# echo "COLOR_FLOOR: ${COLOR_FLOOR}"
convert -size 2048x2048 canvas:transparent PNG32:"icon.png"
if [ ! -z "${BG_FILENAME}" ]; then
@ -34,10 +41,10 @@ build_icon() { # {{{
rsvg-convert -w "${BG_ICON_SIZE}" -h "${BG_ICON_SIZE}" "icon_head.svg" -o "icon_head.png"
# echo "${BG_ICON_TOP};${BG_SHIFT_ICON};${ICON_SHIFT_LEFT}"
# echo "${BG_ICON_TOP};${BG_ICON_SHIFT};${ICON_SHIFT_LEFT}"
if [ ! -z "${BG_ICON_TOP}" ]; then
if [ "${BG_SHIFT_ICON}" == "on" ] && [ ! -z "${ICON_SHIFT_LEFT}" ]; then
if [ "${BG_ICON_SHIFT}" == "on" ] && [ ! -z "${ICON_SHIFT_LEFT}" ]; then
LEFT="$( bc <<< "${ICON_SHIFT_LEFT} + ${BG_ICON_LEFT}" )"
# echo "${LEFT}"
@ -49,30 +56,63 @@ build_icon() { # {{{
else
composite "icon_head.png" -gravity center -background none -colorspace sRGB "icon.png" "icon.png"
fi
BUILT="yes"
} # }}}
build_darwin() { # {{{
mkdir -p "./icons/darwin/${BG_NAME}/${COLOR_NAME}/"
if [ ! -f "./icons/darwin/${BG_NAME}/${COLOR_NAME}/${ICON_NAME}.icns" ]; then
if [ "${BUILT}" == "no" ]; then
build_icon
fi
composite \( "icon.png" -resize 884x884 \) -gravity center -background none \( -size 1024x1024 canvas:transparent \) "icon_1024.png"
mkdir -p "./icons/darwin/${BG_NAME}/${COLOR_NAME}/"
convert "icon_1024.png" -resize 512x512 icon_512.png
convert "icon_1024.png" -resize 256x256 icon_256.png
convert "icon_1024.png" -resize 128x128 icon_128.png
composite \( "icon.png" -resize 884x884 \) -gravity center -background none \( -size 1024x1024 canvas:transparent \) "icon_1024.png"
png2icns "./icons/darwin/${BG_NAME}/${COLOR_NAME}/${ICON_NAME}.icns" icon_512.png icon_256.png icon_128.png > /dev/null
convert "icon_1024.png" -resize 512x512 icon_512.png
convert "icon_1024.png" -resize 256x256 icon_256.png
convert "icon_1024.png" -resize 128x128 icon_128.png
png2icns "./icons/darwin/${BG_NAME}/${COLOR_NAME}/${ICON_NAME}.icns" icon_512.png icon_256.png icon_128.png > /dev/null
fi
} # }}}
build_linux() { # {{{
mkdir -p "./icons/linux/${BG_NAME}/${COLOR_NAME}/"
if [ ! -f "./icons/linux/${BG_NAME}/${COLOR_NAME}/${ICON_NAME}.png" ]; then
if [ "${BUILT}" == "no" ]; then
build_icon
fi
composite \( "icon.png" -resize 846x846 \) -gravity center -background none \( -size 1024x1024 canvas:transparent \) "./icons/linux/${BG_NAME}/${COLOR_NAME}/${ICON_NAME}.png"
mkdir -p "./icons/linux/${BG_NAME}/${COLOR_NAME}/"
if [ -z "${BG_LINUX_SIZE}" ]; then
BG_LINUX_SIZE="952"
fi
if [ -z "${BG_LINUX_TOP}" ]; then
composite \( "icon.png" -resize "${BG_LINUX_SIZE}x${BG_LINUX_SIZE}" \) -gravity center -background none \( -size 1024x1024 canvas:transparent \) "./icons/linux/${BG_NAME}/${COLOR_NAME}/${ICON_NAME}.png"
else
LEFT="$( bc <<< "(1024 - ${BG_LINUX_SIZE}) / 2" )"
TOP="$( bc <<< "${LEFT} + ${BG_LINUX_TOP}" )"
# echo "+${LEFT}+${TOP}"
composite \( "icon.png" -resize "${BG_LINUX_SIZE}x${BG_LINUX_SIZE}" \) -geometry "+${LEFT}+${TOP}" -background none \( -size 1024x1024 canvas:transparent \) "./icons/linux/${BG_NAME}/${COLOR_NAME}/${ICON_NAME}.png"
fi
fi
} # }}}
build_win32() { # {{{
mkdir -p "./icons/win32/${BG_NAME}/${COLOR_NAME}/"
if [ ! -f "./icons/win32/${BG_NAME}/${COLOR_NAME}/${ICON_NAME}.ico" ]; then
if [ "${BUILT}" == "no" ]; then
build_icon
fi
convert "icon.png" -define icon:auto-resize=256,128,96,64,48,32,24,20,16 "./icons/win32/${BG_NAME}/${COLOR_NAME}/${ICON_NAME}.ico"
mkdir -p "./icons/win32/${BG_NAME}/${COLOR_NAME}/"
convert "icon.png" -define icon:auto-resize=256,128,96,64,48,32,24,20,16 "./icons/win32/${BG_NAME}/${COLOR_NAME}/${ICON_NAME}.ico"
fi
} # }}}
for ICON_PATH in "./templates/icons/"*
@ -96,8 +136,6 @@ do
COLOR_NAME="${COLOR_PATH/*\//}"
COLOR_NAME="${COLOR_NAME%.*}"
echo "- ${ICON_NAME}/${BG_NAME}/${COLOR_NAME}: ${BG_COLOR_SET}"
if [ "${BG_COLOR_SET}" == "light" ]; then
source "${COLOR_PATH}/normal.conf"
@ -109,12 +147,8 @@ do
source "${COLOR_PATH}/${BG_COLOR_SET}.conf"
fi
# echo "COLOR_PRIMARY: ${COLOR_PRIMARY}"
# echo "COLOR_MEDIAN1: ${COLOR_MEDIAN1}"
# echo "COLOR_MEDIAN2: ${COLOR_MEDIAN2}"
# echo "COLOR_FLOOR: ${COLOR_FLOOR}"
BUILT="no"
build_icon
build_darwin
build_linux
build_win32

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 KiB

After

Width:  |  Height:  |  Size: 349 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 KiB

After

Width:  |  Height:  |  Size: 513 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 KiB

After

Width:  |  Height:  |  Size: 441 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 KiB

After

Width:  |  Height:  |  Size: 645 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 394 KiB

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 KiB

After

Width:  |  Height:  |  Size: 372 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 KiB

After

Width:  |  Height:  |  Size: 358 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 476 KiB

After

Width:  |  Height:  |  Size: 534 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 KiB

After

Width:  |  Height:  |  Size: 443 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 KiB

After

Width:  |  Height:  |  Size: 648 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 394 KiB

After

Width:  |  Height:  |  Size: 417 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 323 KiB

After

Width:  |  Height:  |  Size: 378 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 KiB

After

Width:  |  Height:  |  Size: 328 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 KiB

After

Width:  |  Height:  |  Size: 482 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 KiB

After

Width:  |  Height:  |  Size: 421 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 481 KiB

After

Width:  |  Height:  |  Size: 560 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 360 KiB

After

Width:  |  Height:  |  Size: 389 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 KiB

After

Width:  |  Height:  |  Size: 334 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 KiB

After

Width:  |  Height:  |  Size: 336 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 KiB

After

Width:  |  Height:  |  Size: 549 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 KiB

After

Width:  |  Height:  |  Size: 453 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 570 KiB

After

Width:  |  Height:  |  Size: 675 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 KiB

After

Width:  |  Height:  |  Size: 429 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 KiB

After

Width:  |  Height:  |  Size: 362 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 KiB

After

Width:  |  Height:  |  Size: 345 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 KiB

After

Width:  |  Height:  |  Size: 624 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 KiB

After

Width:  |  Height:  |  Size: 490 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 645 KiB

After

Width:  |  Height:  |  Size: 760 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 KiB

After

Width:  |  Height:  |  Size: 482 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 KiB

After

Width:  |  Height:  |  Size: 364 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 KiB

After

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 436 KiB

After

Width:  |  Height:  |  Size: 489 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 KiB

After

Width:  |  Height:  |  Size: 439 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 520 KiB

After

Width:  |  Height:  |  Size: 608 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 390 KiB

After

Width:  |  Height:  |  Size: 414 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 308 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 KiB

After

Width:  |  Height:  |  Size: 334 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 430 KiB

After

Width:  |  Height:  |  Size: 482 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 KiB

After

Width:  |  Height:  |  Size: 415 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 513 KiB

After

Width:  |  Height:  |  Size: 598 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 KiB

After

Width:  |  Height:  |  Size: 390 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 353 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 488 KiB

After

Width:  |  Height:  |  Size: 522 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 KiB

After

Width:  |  Height:  |  Size: 688 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 KiB

After

Width:  |  Height:  |  Size: 609 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 768 KiB

After

Width:  |  Height:  |  Size: 818 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 KiB

After

Width:  |  Height:  |  Size: 600 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 KiB

After

Width:  |  Height:  |  Size: 538 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 493 KiB

After

Width:  |  Height:  |  Size: 529 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 676 KiB

After

Width:  |  Height:  |  Size: 716 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 KiB

After

Width:  |  Height:  |  Size: 605 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 765 KiB

After

Width:  |  Height:  |  Size: 810 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 KiB

After

Width:  |  Height:  |  Size: 597 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 KiB

After

Width:  |  Height:  |  Size: 542 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 466 KiB

After

Width:  |  Height:  |  Size: 500 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 KiB

After

Width:  |  Height:  |  Size: 659 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 549 KiB

After

Width:  |  Height:  |  Size: 580 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 689 KiB

After

Width:  |  Height:  |  Size: 727 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 540 KiB

After

Width:  |  Height:  |  Size: 567 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 468 KiB

After

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 KiB

After

Width:  |  Height:  |  Size: 497 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 691 KiB

After

Width:  |  Height:  |  Size: 729 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 KiB

After

Width:  |  Height:  |  Size: 626 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 789 KiB

After

Width:  |  Height:  |  Size: 838 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 598 KiB

After

Width:  |  Height:  |  Size: 623 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 KiB

After

Width:  |  Height:  |  Size: 525 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 480 KiB

After

Width:  |  Height:  |  Size: 515 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 761 KiB

After

Width:  |  Height:  |  Size: 805 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 KiB

After

Width:  |  Height:  |  Size: 662 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 870 KiB

After

Width:  |  Height:  |  Size: 928 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 654 KiB

After

Width:  |  Height:  |  Size: 675 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 KiB

After

Width:  |  Height:  |  Size: 528 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 KiB

After

Width:  |  Height:  |  Size: 493 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 KiB

After

Width:  |  Height:  |  Size: 664 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 KiB

After

Width:  |  Height:  |  Size: 607 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 730 KiB

After

Width:  |  Height:  |  Size: 778 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 576 KiB

After

Width:  |  Height:  |  Size: 598 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 KiB

After

Width:  |  Height:  |  Size: 484 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 476 KiB

After

Width:  |  Height:  |  Size: 510 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 KiB

After

Width:  |  Height:  |  Size: 667 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 KiB

After

Width:  |  Height:  |  Size: 585 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 724 KiB

After

Width:  |  Height:  |  Size: 761 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 551 KiB

After

Width:  |  Height:  |  Size: 577 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 486 KiB

After

Width:  |  Height:  |  Size: 522 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 KiB

After

Width:  |  Height:  |  Size: 311 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 KiB

After

Width:  |  Height:  |  Size: 554 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 KiB

After

Width:  |  Height:  |  Size: 444 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 689 KiB

After

Width:  |  Height:  |  Size: 771 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 KiB

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 339 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 KiB

After

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 KiB

After

Width:  |  Height:  |  Size: 580 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 KiB

After

Width:  |  Height:  |  Size: 446 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 KiB

After

Width:  |  Height:  |  Size: 757 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 399 KiB

After

Width:  |  Height:  |  Size: 413 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 239 KiB

After

Width:  |  Height:  |  Size: 271 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 460 KiB

After

Width:  |  Height:  |  Size: 502 KiB

Some files were not shown because too many files have changed in this diff Show More