Re: Huston, we have a problem (A.K.A. Threshold vs Fixed in hicolor-0.x theme)



On Fri, 2006-12-22 at 22:41 +0100, Luca Ferretti wrote:
> GTK+ seems to implement this in a proper way, so while searching for
> icons at 24 pixels we have:
> 
>         1 current subdir: 22/apps
>         2 check if 22/apps match
>         3 type is threshold, use (<= iconsize <=)
>         4 22 - 2 <= 24 <= 22 + 2 --> TRUE
>         5 OK, 22/app is good
>         6 OK the icon is here
>         7 return 22/apps/iconname and stop seach
>         
> So, due to chosen values, GTK+ simply breaks the icon lookup at 22
> pixels.
> 
> IMHO the Icon Lookup mechanism (and the toolkit/applications
> implementing it) should be updated to perform something like:
> 
>         ...
>         5  OK, 22 is good
>         6  OK the icon is here
>         7  real_distance is != 0 --> continue search
>         8  found another matching subdir 24/app
>         9  OK, 24/app is good
>         10 OK the icon is here
>         11 real_distance is 0 --> use this
>         
> IMHO the issue is in the Icon Lookup mechanism currently defined in Icon
> Theme Spec: you want an icon at XX pixels, the icon is available at XX
> pixel, but you get the icon at smaller size 'cause it's good enough for
> the lookup mechanism.

I see, the requested size matches two size dirs. You're right that in
this case we should choose the better one, not just pick the first
match. Seems like a good fix to me.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a witless crooked astronaut with no name. She's a pregnant green-skinned 
bounty hunter from a different time and place. They fight crime! 




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