MochiMoppel wrote:01micko wrote: I reckon it's an mtpaint bug.
Well, it's not completely unreasonable. Mtpaint expects each declaration on a separate line. That's how XPMs are normally written. On the other hand I found nothing in the specification that mandates this format, and since I like it more compact and other apps have no problem with it I grouped multiple declarations on one line.
Agree & agree.
MochiMoppel wrote:Thanks for the SVG. Creating relative paths by hand is not my cup of tea.
You're welcome.
MochiMoppel wrote:Anyway, since I had to correct my XPM (some transparent pixels on bottom left edge. See edited post above) I also took the liberty to change the SVG. The first path should probably read
Code: Select all
<path d="m 0,16 0,-7 0,0 0,-1.5 q 0,-3 4,-4 l 4,-1 4,1 q 4,1 4,4 l 0,8.5 z" style="fill:#fff"/>
I'll see if I can come up with a similar 48x48 SVG so that it can be used as a desktop icon as well.
I thought the missing pixels were intentional and in my opinion added a bit of character, but hey it's all yours in the end.
Also, there is absolutely no need to re-code the the svg for 48x48 (or any size for that matter). Just add
height="48px" width="48px" to the header just before the
viewBox. You'll see in the screen shot I also have a 500x500 version. Any larger and you can go into the T-shirt printing business. This is how the
Puppy Icon Theme is built.
Later...
Hmm, I found a bug in my svg while scaling large with this script:
Code: Select all
#!/bin/sh
[ -z "$1" ] && echo "you must specify at least 1 size!" && exit
TMP=${TMP:-/tmp/mmviewicon.html}
echo -e "<html>\n<head>\n<title>mmview icon demo</title>\n<head>\n<body bgcolor="#aaa">" > $TMP
for size in "$@"
do
cat >> $TMP << _EOF
<p>
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="${size}px" width="${size}px" viewBox="0 0 16 16">
<path d="m 0,16 0,-7 0,0 0,-1.5 q 0,-3 4,-4 l 4,-1 4,1 q 4,1 4,4 l 0,8.5 z"
style="fill:#fff"/>
<path d="m 0.5,7.5 q 0,-3 4,-4 l 3.5,-1 3.5,1 q 4,1 4,4 m -8.5,-7 1,1 1,-1
m 1,15 2,0 m -12,-6 2,0 z m 2,0 a 2.75,2.75 0 1 1 0,0.01 z m 12,0 a 2.75,2.75 0 1 0 0,0.01 z
l 2,0" style="fill:none;stroke:#000;stroke-width;1"/>
</svg>
${size} x ${size}</p>
_EOF
done
echo -e "</body>\n</html>" >> $TMP
It makes a demo web page.
Notice I've altered the svg path for the line.
The original is now changed to this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 16">
<path d="m 0,16 0,-7 0,0 0,-1.5 q 0,-3 4,-4 l 4,-1 4,1 q 4,1 4,4 l 0,8.5 z" style="fill:#fff"/>
<path d="m 0.5,7.5 q 0,-3 4,-4 l 3.5,-1 3.5,1 q 4,1 4,4 m -8.5,-7 1,1 1,-1 m 1,15 2,0 m -12,-6 2,0 z m 2,0 a 2.75,2.75 0 1 1 0,0.01 z m 12,0 a 2.75,2.75 0 1 0 0,0.01 z l 2,0" style="fill:none;stroke:#000;stroke-width;1"/>
</svg>