Re: [Nautilus-list] changes to svg icon handling



On 2/23/02 4:15 PM, "Alex Larsson" <alexl redhat com> wrote:

> I looked at this a bit too, after your first mail, but I did the rsvg part
> a bit different. I added a new function:
> GdkPixbuf  *
> rsvg_pixbuf_from_file_at_max_size (const gchar     *file_name,
>   gint             max_size,
>   GError         **error)
> 
> Which loads a svg and makes the max of width/height be max_size, and
> scales keeping aspect ratio. I think this is more what you want here.

I think this is the right approach, but I don't see why a single max_size is
appropriate. That only seems OK if you are trying to fit into a square
destination area. Instead, there should be a separate max_x and max_y, and
whichever is more restrictive should take effect. It's true that Nautilus
would pass the same value for max_x and max_y.

>> * The in-icon text display information is synched to the old
>>  version of what the rendered size should be, and worse, since
>>  we effectively scale the icon for free here we need to be able
>>  to scale the available text area as well, cf. the code in
>>  scale_icon that does that.
> 
> Hmmm. I don't seem to see in-icon text at all. Does it work for you?

I don't see in-icon text either, because the icons for plain text files
don't seem to have embedded text rectangles in any of the icon themes I
have. We probably need to fix this.

    -- Darin





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]