After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 170490 - Music thumbnail icon should be scalable
Music thumbnail icon should be scalable
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: [obsolete] Visual Design
2.10.x
Other All
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-03-15 20:34 UTC by Corey Woodworth
Modified: 2005-03-31 01:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Propsed SVG replacement for audio.png (3.59 KB, image/svg)
2005-03-15 20:36 UTC, Corey Woodworth
  Details
Drop in replacement for audio.png (1.07 KB, image/png)
2005-03-15 22:07 UTC, Corey Woodworth
  Details
Audio.svg at the the appropriate size (3.53 KB, image/svg+xml)
2005-03-29 19:35 UTC, Jaap A. Haitsma
  Details
Patch that uses audio.svg instead of audio.png and scales appropriately (2.28 KB, patch)
2005-03-29 19:37 UTC, Jaap A. Haitsma
none Details | Review
Speech Bubble from other side (3.62 KB, image/svg)
2005-03-30 20:58 UTC, Corey Woodworth
  Details

Description Corey Woodworth 2005-03-15 20:34:01 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:
Comment 1 Corey Woodworth 2005-03-15 20:36:31 UTC
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.
Comment 2 Corey Woodworth 2005-03-15 22:07:59 UTC
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 =)
Comment 3 Jaap A. Haitsma 2005-03-28 15:28:50 UTC
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
Comment 4 Nickolay V. Shmyrev 2005-03-28 16:27:42 UTC
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 :)
Comment 5 Jaap A. Haitsma 2005-03-29 08:54:28 UTC
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
Comment 6 Jaap A. Haitsma 2005-03-29 19:35:19 UTC
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
Comment 7 Jaap A. Haitsma 2005-03-29 19:37:18 UTC
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.
Comment 8 Corey Woodworth 2005-03-30 20:58:44 UTC
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 9 Martin Wehner 2005-03-31 01:33:45 UTC
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.