GNOME Bugzilla – Bug 170490
Music thumbnail icon should be scalable
Last modified: 2005-03-31 01:35:38 UTC
When you mouse over audio files a little icon of a speech bubble with a blue note is shown over the icon while the audio file is previewed. This is great, but the bubble is a 24x26 PNG file. In Icon view the music icons themselves can be zoomed in quite a lot (up to 400%) The PNG speech bubble is scaled up to, however it starts to look really nasty scaled up, especially since it is also not anti-aliased correctly. I propose that since this image will be scaled up and down depending on the icons zoom setting, it should be an SVG file. Other information:
Created attachment 38766 [details] Propsed SVG replacement for audio.png Here is a replacement for audio.png done in svg. I did my best to recreate the original as best as I could using inkscape.
Created attachment 38769 [details] Drop in replacement for audio.png This is a rendered version of the SVG as a PNG. It can be dropped in to replace the existing audio.png untill nautilus has support for an SVG. This PNG at least fixes the anti-aliasing. However nautilus doesn't scale it up when the audio icon it is placed on is scaled up. Odd, I don't know why. Perhaps the original audio.png has some hidden code in it or something. Or maybe my install is just b0rked =)
Corey, I'm currently trying to implement your requested feature. When I load audio.svg in nautilus it says that it's size is 32x30 insteand of 26x24. The problem is that your svg uses points (pt) instead of pixels (px). And a point seems to be 1.25 pixels in Inkscape. I've been mucking around in inkscape to get your svg in the right format, but haven't been successful so far Could you edit your svg such that it is 26x24 pixels Thanks
Sorry, isn't SVG is supposed to be scaled, you can use get_pixbuf_from_file_at_size to get image of correct size? So there is not much sense to scale original svg. Anyhow, you can archive your effect by adjusting values in pixels first in Dialogs/Document Options then in Dialogs/Transform. Anyhow thanks for starting work :)
Thanks for the tip for Inkscape. I managed to convert the svg to the appropriate size. The reason that I wanted it changed is that I don't want to hard code the size in the code. Patch will follow later today
Created attachment 39399 [details] Audio.svg at the the appropriate size Note that I added a couple of pixels padding because the composite function which puts the audio.svg on the icon will replicate everything which is on the edges
Created attachment 39400 [details] [review] Patch that uses audio.svg instead of audio.png and scales appropriately Note audio.svg has to be added to nautilus/icons and audio.png has to be removed.
Created attachment 39457 [details] Speech Bubble from other side Cool! Sorry about the wrong image size. This is actually the first image I've ever drawn in inkscape. I'm attaching another alternate audio.svg, but this time with the speech bubble coming from the right. It makes it look like the bubble is coming from the file not from the edge of the file.
Comment on attachment 39400 [details] [review] Patch that uses audio.svg instead of audio.png and scales appropriately It scales the icon twice: once in the rsvg function and then again in the gdk_pixbuf_composite operation. So the emblem gets too huge for large zoom levels (and more jaggy than neccessary). The scale factors for composite need to be 1.0 instead of pixels_per_unit. I changed that, used the new icon from Corey and committed it on HEAD. It looks pretty slick now, thanks.