Title image clobbers separator

Me again. And menus again.

I’ve got this:

DestroyMenu AppsMenu
AddToMenu AppsMenu "*$[fvwm_menumisc]fvwm-logo-starburst-blue-22.png*" Title

and it produces this.

Which is kind of a cool effect and I’d be content to leave it, but it’s not what I was going for. I wanted the image above the line, which was solid, and instead it seems to overlap the line and cut out a section. I’ve tried changing the size of the image, adding blank title text ("" - which produces a large blank space) and adjusting this

MenuStyle * VerticalItemSpacing 0 5
MenuStyle * VerticalTitleSpacing 1 4

to various values other than my usual, but nothing seems to bump the image up a pixel and give me a solid line back.

As I say, I suppose I can just leave it, but I was wondering if I was missing something obvious. Thanks.

As with SidePic, you must ensure the image is scaled to the correct width and height that you want it displayed at. You’re on the right lines with VerticalItemSpacing. Have a look also at the ItemFormat command for menus.

– Thomas Adam

Well, my menu icons are 22x22 and my font defaults to 10 and playing with the spacing centered the fonts to icons. So I scaled the logo to 22x21 (I think, to keep aspect) and that’s what’s in the pic. But I guessed it could be hardcoded for a miniicon so tried scaling one to 16 height and got the same effect with a just a smaller image. Then I tried spacing adjustments, but those didn’t work either. I’ll try some more of that and look at ItemFormat again. Thanks.

It’s a bug - off-by-one or some such. ItemFormat is only for horizontal and VerticalTitleSpacing is only for text. Neither touch the vertical spacing of an image. I can use an image 250(!) or 22 or 16 or 8 pixels high and even use another image altogether and I still get the same effect. I threw out my config and started over and I see an interesting effect: with transparency it seems to obliterate the line because it’s only a pixel of color or the contrast is too slight, but with 3D-on-solid I can see that it retains the white part of the line, just not the black shadow above. So, in other words, no matter what, it insists on sizing the space for the image one pixel too small for the actual image.

Anyway to lie to fvwm and tell it the image is 23 pixels high when it’s 22? :angry: Cuz that’d fix it.

Argh. Even creating a new image with a healthy layer of transparency in the bottom of the image didn’t get it - still obliterated the pixel, transparency or no. But I (sorta) got it.

I created a new menu style for this specific menu, switched TitleUnderlines1 to TitleUnderlines0 in that style, added a normal separator at the top of the content def to take the place of the title underline, changed the style to the new style, and any of my images work, showing up above the separator like they ought to.