mirror of https://github.com/oxen-io/lokinet
Remake non-mac icon; regenerate during build for windows
The non-mac icon was an old version with white foreground and a completely transparent background, but this looks bad (or invisible) depending on where you view it. This updates it based on the macos icon, but with a round white circle background instead of the macos "squircle" background. This also replaces the .ico file for the installer with one that we build during the win32 build rather than a pregenerated one. Bumps the gui as well to a version with the new icons in place.pull/2008/head
parent
768e953522
commit
25d73d627a
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@ -1,21 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 189.4 189.4" style="enable-background:new 0 0 189.4 189.4;" xml:space="preserve">
|
||||
<!-- our size/viewbox is positioned such that 0,0 is the center of the image (to simplify scaling and rotation). -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="-512px" y="-512px"
|
||||
viewBox="-512 -512 1024 1024" style="enable-background:new -512 -512 1024 1024;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#FFFFFF;}
|
||||
.bg{fill:#FFFFFF;}
|
||||
</style>
|
||||
<g>
|
||||
<polygon class="st0" points="113.6,132.6 94.7,151.5 75.8,132.6 56.8,151.5 94.7,189.4 132.6,151.5 "/>
|
||||
<polygon class="st0" points="132.6,113.6 151.5,94.7 132.6,75.8 151.5,56.8 189.4,94.7 151.5,132.6 "/>
|
||||
<polygon class="st0" points="56.8,75.8 37.9,94.7 56.8,113.6 37.9,132.6 0,94.7 37.9,56.8 "/>
|
||||
<polygon class="st0" points="75.8,56.8 94.7,37.9 113.6,56.8 132.6,37.9 94.7,0 56.8,37.9 "/>
|
||||
|
||||
<rect x="100.2" y="100.2" transform="matrix(0.7071 0.7071 -0.7071 0.7071 113.6329 -47.0683)" class="st0" width="26.8" height="26.8"/>
|
||||
|
||||
<rect x="62.4" y="62.4" transform="matrix(0.7071 0.7071 -0.7071 0.7071 75.7552 -31.3789)" class="st0" width="26.8" height="26.8"/>
|
||||
|
||||
<rect x="100.2" y="62.4" transform="matrix(0.7071 0.7071 -0.7071 0.7071 86.8493 -58.1624)" class="st0" width="26.8" height="26.8"/>
|
||||
|
||||
<rect x="62.4" y="100.2" transform="matrix(0.7071 0.7071 -0.7071 0.7071 102.5388 -20.2848)" class="st0" width="26.8" height="26.8"/>
|
||||
|
||||
<!--
|
||||
Draw the background shape in a 2x2 box (from -1 to 1 in each dimension), then scale it up
|
||||
(but not all the way to 512, because we want some padding around the outside.
|
||||
-->
|
||||
<g transform="scale(512)">
|
||||
<circle r="1" class="bg"/>
|
||||
</g>
|
||||
|
||||
<g id="shape0">
|
||||
<!--
|
||||
Start with a simple 3x2 shape, where each unit we draw corresponds to 1 block edge length in the
|
||||
final diagram, and shift it so that 2.5x2.5 becomes the new origin (around which we will rotate).
|
||||
Then we rotate and scale it to the desired size.
|
||||
|
||||
We can then copy that at 90, 180, 270 degree rotations to complete the logo.
|
||||
-->
|
||||
<g transform="rotate(45) scale(105) translate(-2.5, -2.5)">
|
||||
<polygon points="0,0 2,0 2,1 1,1 1,2 0,2"/>
|
||||
<rect x="1" y="2" width="1" height="1"/>
|
||||
</g>
|
||||
</g>
|
||||
|
||||
<use xlink:href="#shape0" transform="rotate(90)"/>
|
||||
<use xlink:href="#shape0" transform="rotate(180)"/>
|
||||
<use xlink:href="#shape0" transform="rotate(270)"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Invoked from cmake as make-ico.sh /path/to/icon.svg /path/to/output.ico
|
||||
svg="$1"
|
||||
out="$2"
|
||||
outdir="$out.d"
|
||||
|
||||
set -e
|
||||
|
||||
sizes=(16 24 32 40 48 64 96 192 256)
|
||||
outs=""
|
||||
|
||||
mkdir -p "${outdir}"
|
||||
for size in "${sizes[@]}"; do
|
||||
outf="${outdir}/${size}x${size}.png"
|
||||
if [ $size -lt 32 ]; then
|
||||
# For 16x16 and 24x24 we crop the image to 3/4 of its regular size before resizing and make
|
||||
# it all white (instead of transparent) which effectively zooms in on it a bit because if we
|
||||
# resize the full icon it ends up a fuzzy mess, while the crop and resize lets us retain
|
||||
# some detail of the logo.
|
||||
convert -background white -resize 512x512 "$svg" -gravity Center -extent 320x320 -resize ${size}x${size} -strip "png32:$outf"
|
||||
else
|
||||
convert -background transparent -resize ${size}x${size} "$svg" -strip "png32:$outf"
|
||||
fi
|
||||
outs="-r $outf $outs"
|
||||
done
|
||||
|
||||
icotool -c -b 32 -o "$out" $outs
|
@ -1 +1 @@
|
||||
Subproject commit 37b1f015b73586c404971e6724721d4f1343ed50
|
||||
Subproject commit 7b0f1aacdf79b558adfc39dc9cccb7e348aeec03
|
Loading…
Reference in New Issue