Re: Scaling icons



On Fri, 2003-05-16 at 00:44, Owen Taylor wrote:

> Both of the algorithms here have some issues - I think the KDE
> code is more right in not scaling in some circumstances, but the
> handling of the exact scale ratios in nautilus seems better.
> 
> What I'm thinking of doing 
> (image_size = MAX(image_width,image_height):
>  
>  - For "fixed" size icons, don't scale
> 
>  - For "Scalable" icons, load them at a scale of 
>    desired_size / dir_size. If dir_size isn't set (the icon
>    theme spec requires dir_size, but I bet some KDE themes will
>    omit it) load them at a scale of desired_size/image_size.
> 
>  - For "Threshold" icons, if desired_size - dir_size > threshold
>    load at a scale of desired_size / dir_size, otherwise don't
>    scale.
> 
>  - For unthemed icons, adopt the nautilus algorithm: scale
>    by desired_size / image_size if image_size > MIN_SIZE,
>    otherwise don't scale. Probably use the nautilus MIN_SIZE
>    value of 53 for lack of anything better.
> 
> Does this make sense?

It seems good to me, and I should probably change Nautilus to do the
same.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a witless hunchbacked ex-con searching for his wife's true killer. She's 
a foxy extravagent archaeologist with the power to bend men's minds. They 
fight crime! 




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