Improve the bitmap and vector mime icons

* Vector files such as Illustrator files currently show the "image"
icon. I propose to add a new type to mimetypeIcon() called
"image/vector" and which would be used by SVG as well
* We can use the current image-svg+xml icon, but would simply rename it
to image-vector
* The black and white "image" icon looks too much like a settings icon.
A simple picture representation pasted over the file icon should work
This commit is contained in:
Olivier Paroz 2014-12-02 21:11:56 +01:00
parent e9029f94cb
commit 5990293331
5 changed files with 171 additions and 56 deletions

View File

Before

Width:  |  Height:  |  Size: 885 B

After

Width:  |  Height:  |  Size: 885 B

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 903 B

After

Width:  |  Height:  |  Size: 769 B

View File

@ -1,57 +1,169 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs>
<radialGradient id="t" xlink:href="#a" gradientUnits="userSpaceOnUse" cy="486.65" cx="605.71" gradientTransform="matrix(.028917 0 0 .012353 26.973 38.471)" r="117.14"/>
<linearGradient id="a">
<stop offset="0"/>
<stop stop-opacity="0" offset="1"/>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
id="svg2"
version="1.1"
width="32"
height="32">
<metadata
id="metadata48">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs4">
<linearGradient
id="a">
<stop
id="stop7"
offset="0" />
<stop
id="stop9"
offset="1"
stop-opacity="0" />
</linearGradient>
<radialGradient id="u" xlink:href="#a" gradientUnits="userSpaceOnUse" cy="486.65" cx="605.71" gradientTransform="matrix(-.028917 0 0 .012353 21.027 38.471)" r="117.14"/>
<linearGradient id="l" x1="302.86" gradientUnits="userSpaceOnUse" y1="366.65" gradientTransform="matrix(.084497 0 0 .012353 -6.5396 38.471)" x2="302.86" y2="609.51">
<stop stop-opacity="0" offset="0"/>
<stop offset=".5"/>
<stop stop-opacity="0" offset="1"/>
<linearGradient
y2="43"
x2="24"
gradientTransform="matrix(0.56757,0,0,0.72973,2.3784,-2.5135)"
y1="5.5641"
gradientUnits="userSpaceOnUse"
x1="24"
id="g">
<stop
id="stop12"
offset="0"
stop-color="#fff" />
<stop
id="stop14"
offset=".036262"
stop-opacity=".23529"
stop-color="#fff" />
<stop
id="stop16"
offset=".95056"
stop-opacity=".15686"
stop-color="#fff" />
<stop
id="stop18"
offset="1"
stop-opacity=".39216"
stop-color="#fff" />
</linearGradient>
<linearGradient id="r" x1="16.626" gradientUnits="userSpaceOnUse" y1="15.298" gradientTransform="matrix(.57894 0 0 .65062 2.0784 1.9502)" x2="20.055" y2="24.628">
<stop stop-color="#fff" offset="0"/>
<stop stop-color="#fff" stop-opacity="0" offset="1"/>
<linearGradient
y2="47.013"
x2="25.132"
gradientTransform="matrix(0.65714,0,0,0.63012,0.22856,-1.0896)"
y1=".98521"
gradientUnits="userSpaceOnUse"
x1="25.132"
id="h">
<stop
id="stop21"
offset="0"
stop-color="#f4f4f4" />
<stop
id="stop23"
offset="1"
stop-color="#dbdbdb" />
</linearGradient>
<linearGradient id="o" x1="24" gradientUnits="userSpaceOnUse" y1="5.5641" gradientTransform="matrix(.77477 0 0 .61261 -2.5946 1.2973)" x2="24" y2="43">
<stop stop-color="#fff" offset="0"/>
<stop stop-color="#fff" stop-opacity=".23529" offset=".036262"/>
<stop stop-color="#fff" stop-opacity=".15686" offset=".95056"/>
<stop stop-color="#fff" stop-opacity=".39216" offset="1"/>
</linearGradient>
<linearGradient id="p" x1="25.132" gradientUnits="userSpaceOnUse" y1=".98521" gradientTransform="matrix(.85714 0 0 .52148 -4.5714 2.6844)" x2="25.132" y2="47.013">
<stop stop-color="#f4f4f4" offset="0"/>
<stop stop-color="#dbdbdb" offset="1"/>
</linearGradient>
<linearGradient id="q" x1="-51.786" gradientUnits="userSpaceOnUse" y1="50.786" gradientTransform="matrix(.69214 0 0 .48803 46.352 2.1033)" x2="-51.786" y2="2.9062">
<stop stop-color="#a0a0a0" offset="0"/>
<stop stop-color="#bebebe" offset="1"/>
</linearGradient>
<linearGradient id="m" x1="45.414" gradientUnits="userSpaceOnUse" y1="15.27" gradientTransform="matrix(.32723 0 0 .25356 -38.234 -30.559)" x2="45.567" y2="96.253">
<stop stop-color="#262626" offset="0"/>
<stop stop-color="#4d4d4d" offset="1"/>
</linearGradient>
<linearGradient id="n" x1="-24.032" gradientUnits="userSpaceOnUse" y1="-13.091" gradientTransform="matrix(.74286 0 0 .74074 1.8384 4.0069)" x2="-24.098" y2="-40.164">
<stop stop-color="#1d1d1d" offset="0"/>
<stop offset="1"/>
</linearGradient>
<linearGradient id="s" x1="149.98" gradientUnits="userSpaceOnUse" y1="-104.24" gradientTransform="matrix(.28088 0 0 .28276 -22.128 49.806)" x2="149.98" y2="-174.97">
<stop stop-color="#272727" offset="0"/>
<stop stop-color="#454545" offset="1"/>
<radialGradient
r="117.14"
gradientTransform="matrix(0.015663,0,0,0.0082353,17.61,25.981)"
cx="605.71"
cy="486.65"
gradientUnits="userSpaceOnUse"
xlink:href="#a"
id="j" />
<radialGradient
r="117.14"
gradientTransform="matrix(-0.015663,0,0,0.0082353,14.39,25.981)"
cx="605.71"
cy="486.65"
gradientUnits="userSpaceOnUse"
xlink:href="#a"
id="k" />
<linearGradient
y2="609.51"
x2="302.86"
gradientTransform="matrix(0.045769,0,0,0.0082353,-0.54232,25.981)"
y1="366.65"
gradientUnits="userSpaceOnUse"
x1="302.86"
id="i">
<stop
id="stop28"
offset="0"
stop-opacity="0" />
<stop
id="stop30"
offset=".5" />
<stop
id="stop32"
offset="1"
stop-opacity="0" />
</linearGradient>
</defs>
<g opacity=".4" stroke-width=".0225" transform="matrix(.66667 0 0 .66667 0 -1.6667)">
<rect y="43" width="40.8" fill="url(#l)" x="3.6" height="3"/>
<path d="m3.6 43v2.9998c-1.4891 0.006-3.6-0.672-3.6-1.5s1.6618-1.5 3.6-1.5z" fill="url(#u)"/>
<path d="m44.4 43v2.9998c1.4891 0.0056 3.6-0.67211 3.6-1.5001 0-0.828-1.6618-1.4997-3.6-1.4997z" fill="url(#t)"/>
<g
style="display:inline"
id="layer2">
<g
id="g8645">
<rect
style="opacity:0.15;fill:url(#i)"
height="2"
width="22.1"
y="29"
x="4.9499998"
id="rect34" />
<path
style="opacity:0.15;fill:url(#k)"
d="m 4.95,29 0,1.9999 C 4.14338,31.0037 3,30.55183 3,29.9998 3,29.4478 3.90012,28.99998 4.95,28.99998 Z"
id="path36" />
<path
style="opacity:0.15;fill:url(#j)"
d="m 27.05,29 0,1.9999 c 0.80661,0.0038 1.95,-0.44807 1.95,-1.0001 0,-0.552 -0.90012,-0.99982 -1.95,-0.99982 z"
id="path38" />
<path
style="fill:url(#h)"
d="m 4.5,0.49996 c 5.2705,0 23,0.00185 23,0.00185 l 2.8e-5,28.998 -23,0 0,-29 z"
id="path40" />
<path
style="fill:none;stroke:url(#g);stroke-linecap:round;stroke-linejoin:round"
d="m 26.5,28.5 -21,0 0,-27 21,0 z"
id="path42" />
<path
style="opacity:0.3;fill:none;stroke:#000000;stroke-width:0.99992001;stroke-linejoin:round"
d="m 4.5,0.49996 c 5.2705,0 23,0.00185 23,0.00185 l 2.8e-5,28.998 -23,0 0,-29 z"
id="path44" />
</g>
</g>
<g
style="display:inline"
id="layer1">
<path
style="clip-rule:evenodd;display:inline;opacity:0.89800002;fill:#5b2d8d;fill-rule:evenodd"
d="m 7.788591,21.255219 16.422818,0 0,-15.5104382 -16.4228181,0 M 11.417045,8.618467 c 1.094446,0 1.981011,0.826101 1.981011,1.84514 0,1.019037 -0.886565,1.845817 -1.981011,1.845817 -1.093768,0 -1.97965,-0.8261 -1.97965,-1.845817 0,-1.019039 0.885882,-1.84514 1.97965,-1.84514 z m -2.610776,9.453279 2.93483,-2.201124 1.49391,1.090372 5.920613,-4.381864 2.20112,1.635895 1.493231,-1.08969 0,4.946411 z"
id="path8625" />
<path
id="path8614"
d="m 10.657628,12.066218 c -1.8593391,-0.82639 -1.2884191,-3.3318443 0.759609,-3.3335077 1.929708,-0.00157 2.62053,2.3939927 0.937913,3.2523997 -0.615125,0.313814 -1.119701,0.337922 -1.697522,0.08111 z"
style="fill:#ffffff;fill-opacity:1" />
<path
id="path8616"
d="m 10.391751,16.948557 1.339876,-1.003985 0.735084,0.526382 c 0.404296,0.28951 0.803324,0.486606 0.886729,0.437992 0.0834,-0.04861 1.420293,-1.028823 2.970862,-2.178242 l 2.819218,-2.089853 0.43502,0.322947 c 0.239261,0.177621 0.742396,0.544704 1.118079,0.815741 l 0.683058,0.492793 0.706772,-0.538949 0.706772,-0.538948 0,2.379054 0,2.379053 -6.870673,0 -6.8706736,0 1.3398766,-1.003985 z"
style="fill:#ffffff;fill-opacity:1" />
</g>
<path stroke-linejoin="round" stroke="url(#q)" stroke-width=".0066667" d="m0.99997 4c6.8745 0 30 0.0015 30 0.0015l0.000036 23.999h-30v-24z" fill="url(#p)"/>
<path stroke-linejoin="round" d="m30.333 27.333h-28.667v-22.667h28.667z" stroke="url(#o)" stroke-linecap="round" stroke-width=".0066667" fill="none"/>
<rect ry="0" rx="0" transform="matrix(-.99999 .0037552 .0024409 -1 0 0)" height="19.903" width="25.952" stroke="url(#n)" stroke-linecap="round" y="-26.012" x="-29.015" stroke-width=".0066668" fill="url(#m)"/>
<path style="color:#000000" d="m14.458 9.5417c-0.73638 0-1.3333 1.1939-1.3333 2.6667 0 0.24505 0.01072 0.48294 0.04167 0.70833-0.15826-0.15989-0.30816-0.33156-0.5-0.47917-1.1673-0.89808-2.4885-1.1461-2.9375-0.5625-0.44904 0.58363 0.14525 1.7894 1.3125 2.6875 0.22148 0.1704 0.44175 0.29391 0.66667 0.41667-0.25479 0.03257-0.52266 0.08822-0.79167 0.16667-1.4139 0.41232-2.3937 1.3347-2.1875 2.0417 0.20616 0.70693 1.5236 0.93315 2.9375 0.52083 0.2651-0.07731 0.52042-0.1633 0.75-0.27083-0.05604 0.10202-0.11595 0.20204-0.16667 0.3125-2.7782 2.4796-5.0625 7.2292-5.0625 7.2292l0.95833 0.02083c0.5207-1.25 1.8077-3.994 3.7925-6.293-0.28085 1.1684-0.0992 2.2006 0.5 2.4167 0.69271 0.24982 1.667-0.67708 2.1667-2.0625 0.04494-0.12462 0.06976-0.25209 0.10417-0.375 0.05396 0.11891 0.10152 0.23517 0.16667 0.35417 0.70727 1.2918 1.8124 2.062 2.4583 1.7083 0.64591-0.35364 0.58227-1.6874-0.125-2.9792-0.04035-0.07369-0.08227-0.13821-0.125-0.20833 0.07835 0.02437 0.14794 0.04131 0.22917 0.0625 1.4251 0.37181 2.7308 0.10836 2.9167-0.60417 0.18591-0.71253-0.82495-1.5865-2.25-1.9583-0.02183-0.0057-0.04073-0.01544-0.0625-0.02083 0.01921-0.01078 0.04331-0.0098 0.0625-0.02083 1.2754-0.73638 2.014-1.8623 1.6458-2.5-0.36819-0.63772-1.7037-0.54888-2.9792 0.1875-0.40854 0.23587-0.74162 0.50638-1.0208 0.79167 0.10589-0.38234 0.16667-0.82364 0.16667-1.2917 0-1.4728-0.59695-2.6667-1.3333-2.6667zm0.042 4.4583c0.92048 0 1.6667 0.74619 1.6667 1.6667 0 0.92047-0.74619 1.6667-1.6667 1.6667-0.92048 0-1.6667-0.74619-1.6667-1.6667 0-0.921 0.747-1.667 1.667-1.667z" fill="url(#s)"/>
<path d="m14.458 10.188c-0.73638 0-1.3333 1.1939-1.3333 2.6667 0 0.24504 0.01072 0.48294 0.04167 0.70833-0.15826-0.15989-0.30816-0.33156-0.5-0.47917-1.1673-0.89808-2.4885-1.1461-2.9375-0.5625-0.44904 0.58363 0.14525 1.7894 1.3125 2.6875 0.22148 0.1704 0.44175 0.29391 0.66667 0.41667-0.25479 0.03257-0.52266 0.08822-0.79167 0.16667-1.4139 0.41232-2.3937 1.3347-2.1875 2.0417 0.20616 0.70693 1.5236 0.93315 2.9375 0.52083 0.2651-0.07731 0.52042-0.1633 0.75-0.27083-0.05604 0.10202-0.11595 0.20204-0.16667 0.3125-2.7782 2.479-5.0625 7.229-5.0625 7.229l0.95833 0.02083c0.52039-1.2493 1.8073-3.9927 3.7917-6.2917-0.28085 1.1684-0.0992 2.2006 0.5 2.4167 0.69271 0.24982 1.667-0.67708 2.1667-2.0625 0.04494-0.12462 0.06976-0.25209 0.10417-0.375 0.05396 0.11891 0.10152 0.23517 0.16667 0.35417 0.70727 1.2918 1.8124 2.062 2.4583 1.7083 0.64591-0.35364 0.58227-1.6874-0.125-2.9792-0.04035-0.07369-0.08227-0.13821-0.125-0.20833 0.07835 0.02437 0.14794 0.04131 0.22917 0.0625 1.4251 0.37181 2.7308 0.10836 2.9167-0.60417 0.18591-0.71253-0.82495-1.5865-2.25-1.9583-0.02183-0.0057-0.04073-0.01544-0.0625-0.02083 0.01921-0.01078 0.04331-0.0098 0.0625-0.02083 1.2754-0.73638 2.014-1.8623 1.6458-2.5-0.36819-0.63772-1.7037-0.54888-2.9792 0.1875-0.40854 0.23587-0.74162 0.50638-1.0208 0.79167 0.10589-0.38234 0.16667-0.82364 0.16667-1.2917 0-1.4728-0.59695-2.6667-1.3333-2.6667zm0.042 4.458c0.92048 0 1.6667 0.74619 1.6667 1.6667 0 0.92048-0.74619 1.6667-1.6667 1.6667-0.92048 0-1.6667-0.74619-1.6667-1.6667 0-0.92048 0.74619-1.6667 1.6667-1.6667z" fill="#d2d2d2"/>
<path opacity=".15" fill="url(#r)" d="m2.6667 5.6667 0.0087 12c0.7672-0.012 26.076-4.424 26.658-4.636l-0.000092-7.3644z" fill-rule="evenodd"/>
</svg>

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -158,7 +158,10 @@ class OC_Helper {
$alias = array(
'application/octet-stream' => 'file', // use file icon as fallback
'application/illustrator' => 'image',
'application/illustrator' => 'image/vector',
'application/postscript' => 'image/vector',
'image/svg+xml' => 'image/vector',
'application/coreldraw' => 'image',
'application/x-gimp' => 'image',
'application/x-photoshop' => 'image',