1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-06-25 10:48:04 +02:00

"multi-size" app icons on linux

+ icon structure cleanup
This commit is contained in:
2020-07-10 00:57:31 +02:00
parent d6e0757364
commit 5343a1a922
17 changed files with 39 additions and 6 deletions

View File

@ -0,0 +1,15 @@
fit:#006600
gpx:#003399
igc:#ff3300
json:#003333
kml:#990000
nmea:#0083d7
plt:#66ff00
rte:#66ff00
tcx:#ffcc00
wpt:#66ff00
loc:#556677
slf:#881199
cup:#20a810
gpi:#fca314
sml:#6434eb

25
icons/formats/scripts/icns.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
while read e; do
IFS=":"; set $e
EXT=`echo $1 | tr /a-z/ /A-Z/`
sed -e "s/\$EXTENSION/$EXT/" -e "s/\$COLOR/$2/" icon-template.svg > $1.svg
ICONSET=$1.iconset
mkdir $ICONSET
convert -density 400 -background none -resize '16x16' "$1.svg" "$ICONSET/icon_16x16.png"
convert -density 400 -background none -resize '32x32' "$1.svg" "$ICONSET/icon_16x16@2x.png"
cp "$ICONSET/icon_16x16@2x.png" "$ICONSET/icon_32x32.png"
convert -density 400 -background none -resize '64x64' "$1.svg" "$ICONSET/icon_32x32@2x.png"
convert -density 400 -background none -resize '128x128' "$1.svg" "$ICONSET/icon_128x128.png"
convert -density 400 -background none -resize '256x256' "$1.svg" "$ICONSET/icon_128x128@2x.png"
cp "$ICONSET/icon_128x128@2x.png" "$ICONSET/icon_256x256.png"
convert -density 400 -background none -resize '512x512' "$1.svg" "$ICONSET/icon_256x256@2x.png"
cp "$ICONSET/icon_256x256@2x.png" "$ICONSET/icon_512x512.png"
convert -density 400 -background none -resize '1024x1024' "$1.svg" "$ICONSET/icon_512x512@2x.png"
iconutil -c icns -o $1.icns "$ICONSET"
rm -R "$ICONSET" $1.svg
done < extensions

10
icons/formats/scripts/ico.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
while read e; do
IFS=":"; set $e
EXT=`echo $1 | tr /a-z/ /A-Z/`
sed -e "s/\$EXTENSION/$EXT/" -e "s/\$COLOR/$2/" icon-template.svg > $1.svg
convert -density 400 $1.svg -define icon:auto-resize $1.ico
rm $1.svg
done < extensions

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8" ?>
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" height="185" width="185">
<path id="envelope" style="fill:#ffffff;stroke:#999999;stroke-width:2.18774867" d="m 128.23996,2.2548915 -95.377018,0 0,181.0580085 134.394868,0 0,-141.313567 z m 0,0 0,39.7444415 39.01785,0" />
<g id="logo" transform="matrix(0.89093793,0,0,0.84489692,3.5017807,-51.565424)">
<polyline style="fill:none;fill-opacity:0;stroke:#000000;stroke-width:4" points="62.3563,178.566 73.5,125.854 96,151.875 113,90.875 136.5,172.375 148.831,160.03 "/>
<circle style="fill:#000000" cx="113" cy="90.875" r="8"/>
<circle style="fill:#000000" cx="73.5" cy="125.854" r="8"/>
<circle style="fill:#000000" cx="136.5" cy="172.375" r="8"/>
<circle style="fill:#000000" cx="60.700001" cy="186.39999" r="8"/>
<circle style="fill:#000000" cx="154.5" cy="154.354" r="8"/>
<circle style="fill:#000000" cx="96" cy="151.875" r="8"/>
</g>
<g transform="translate(16.573463,124.9782)">
<rect y="0" x="0" id="textrect" height="50" width="120" style="fill:$COLOR;fill-opacity:1;stroke:none;"/>
<!--
<text y="28" x="60" dominant-baseline="central" text-anchor="middle" style="fill:#FFFFFF;font-size:39px;font-family:Helvetica;font-weight:bold;">$EXTENSION</text>
-->
<text y="25" x="60" dy="0.36em" text-anchor="middle" style="fill:#FFFFFF;font-size:39px;font-family:Helvetica;font-weight:bold;">$EXTENSION</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB