----- Carlos R. Mafra <[email protected]> a écrit :
> On Thu,  7 Jun 2012 at 23:47:39 +0200, Rodolfo García Peñas wrote:
> 
> > Subject: [PATCH 07/10] ICON_SIZE defined as wPreferences.icon_size
> > 
> > This change permits icon sizes different than 64.
> 
> > ---
> >  src/icon.c |    7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/src/icon.c b/src/icon.c
> > index 55cd251..576e459 100644
> > --- a/src/icon.c
> > +++ b/src/icon.c
> > @@ -49,6 +49,7 @@
> >  extern WPreferences wPreferences;
> >  
> >  #define MOD_MASK wPreferences.modifier_mask
> > +#define ICON_SIZE wPreferences.icon_size
> >  #define CACHE_ICON_PATH "/Library/WindowMaker/CachedPixmaps"
> >  
> >  extern Cursor wCursor[WCUR_LAST];
> > @@ -354,9 +355,9 @@ RImage *wIconValidateIconSize(WScreen * scr, RImage * 
> > icon, int max_size)
> >     if (!icon)
> >             return NULL;
> >  #ifndef DONT_SCALE_ICONS
> > -   if (max_size != 64) {
> > -           w = max_size * icon->width / 64;
> > -           h = max_size * icon->height / 64;
> > +   if (max_size != ICON_SIZE) {
> > +           w = max_size * icon->width / ICON_SIZE;
> > +           h = max_size * icon->height / ICON_SIZE;
> 
> I don't think this is about permitting icon sizes different than 64
> (what's the purpose of wPreferences.icon_size otherwise?), but
> whether you scale the icon if its size is different than 64.
> And I've just tested using a icon size 96 with and without your patch,
> and with your patch the result looks worse. Did you try it?
> 
> So the patch description is not correct. What's up with this one?

Hi,

I did have a quick look at this, and my understanding is that this function was 
meant for this:
 - WMaker's *IDEAL* icon size is 64;
 - if an icon is not that size, it is displayed *TRUNCATED*.
 - this function *DOES NOT* resize the icon to make it fit!
 - it scales the icon *SO THAT THE TRUNCATION IS ALWAYS THE SAME* whatever the 
user's preferred icon size is.

So basically, I would suggest not to take this patch that break things. by the 
way, the "max_size" parameter is given as "wPreferences.icon_size", so this 
leads for the code to be actually ignored.

Hope this helps,
Christophe.


--
To unsubscribe, send mail to [email protected].

Reply via email to