On Sun, Jul 31, 2005 at 03:33:08PM +0200, Dominik Vogt wrote:
> On Thu, May 19, 2005 at 02:44:16PM +1000, Cameron Simpson wrote:
> > I have a Colorset that is used for my menus.
> > It appears that AspectPixmap does not work correctly for menus.
> > I have:
> > 
> >     MenuStyle "*" MenuColorset 2
> > 
> > and I say, via FvwmCommand, some Colorset commands to set the menu backdrop.
> > When I say:
> > 
> >     Colorset 2 AspectPixmap /path/to/image.png
> > 
> > I get an image that appears somewhat adjusted for the menu, but incorrectly.
> > The image width appears to have been stretched to fit the menu, but the
> > height is grossly wrong (generally it seems too short), and so the Aspect
> > of the image is not the original aspect.
> > 
> > Further, if I pop up a tall menu I get an image apparently sized for the
> > width of the menu (but with the aspect ratio shorter than the original
> > image), with the root background in the unfilled areas.
> > 
> > Then a subsequent short menu gets the image apparently again sized for
> > the width  of the menu (and again with the aspect ratio to short - more
> > so than before) and with left over pixels from the previous, larger,
> > image resize for the previous tall menu.
> > 
> > It appears to me that the image resizing is being called with the correct
> > menu width (and presumably then the correct menu height), but the new
> > image size computation based on this to preserve the image backdrop is
> > not quite right. And the buffer used for the backdrop is not initialised
> > correctly, but reused from an earlier buffer (or maybe just memory that
> > happens to overlap that).
> 
> I can reproduce all these effects.
> 
> > [ Pulls out 2.5.12 source... ]
> > Should I be concerned by menustyle_free_face() in menustyle.c that says:
> > 
> >         switch (mf->type)
> >         {
> >         case GradientMenu:
> >                 [...]
> >                 break;
> >         case PixmapMenu: 
> >         case TiledPixmapMenu:
> >                 if (mf->u.p)  
> >                 {       
> >                         PDestroyFvwmPicture(dpy, mf->u.p);
> >                 }
> >                 mf->u.p = NULL;
> >                 break;
> >         case SolidMenu:
> >                 FreeColors(&mf->u.back, 1, True);
> >         default:
> >                 break;
> >         }
> >         mf->type = SimpleMenu;
> > 
> > No AspectPixmap there. Is that a problem?
> 
> No, it just means that MenuStyle has no AspectPixmap option.  You
> are using a colorset which is handled by teh default case.
> 
> > Pixmap and TiledPixmap seem to behave, but they are not what I want.
> > 
> > AspectPixmap would be I hope.
> > 
> > I basicly want a full view of the image, shrunk/enlarged to fill the menu
> > in one direction and padded by the default background in the other to fit
> > (or maybe left aligned, or tiled in that size). Since menus are dynamic
> > in size (i.e. WindowList menus mostly) neither Pixmap nor TiledPixmap
> > quite cut it because my desired backgrounds are pictures and not tiles.
> 
> That's the idea.  I'll look into it.

Fixed.

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [EMAIL PROTECTED]

Attachment: signature.asc
Description: Digital signature

Reply via email to