Under the title

I was wondering if you can somehow define what’s in between the window and it’s decorations in fvwm?
Couple of pictures demostrating what I’m after:

  1. Without:

  2. What I’m after:

No, it can’t be done, at present. I suppose you could (depending on how you have your default decor setup) define a pixmap for the titlebar to give the allusion of something added at the bottom of the titlebar, but it would be tricky.

– Thomas Adam

Thanks Thomas! :slight_smile:
I actually got it to work (except the Toggled states) with MultiPixmap option and a transparent png. It sure was tricky :laughing:

That’s a thought - why not edit your icons to include the baseline as well. Then it won’t matter if they surpress the title background on toggling.

If that makes any sense at all

Hmm… good idea, but my guess is that as the buttonstyles uses – usetitlestyle as flag, the line wouldn’t be where the titlebars bottom line is because icon isn’t drawn to that area where the titlebar bottom line should be shown.

I guess it would look like the line would be located a little bit higher than it should.

howabout if you size the icons to be the same height as the titlebar?

It’d look odd if you changed the size of the title bar, or upped the font size, but if things are fairly stable then you should be able to force the line to fall where you will

Well, I don’t think that would solve the problem (if I understand correctly, there always remains a reserved space for ie the MultiPixmap Buttons -option).
But I did come up with an idea to make this “feature” to my advantage.
The idea is to make a vector drawn around the icon, so it stands out in Toggled state. Also the vectors would kinda continue the line from titlebar, making kind of a de-tour around the icon. :slight_smile:
I’ll come back when I have this idea working.

Thanks for the suggestions, and admins, sorry for two posts :blush:

Aha! The titlebar height wasn’t enough for the icons, so the Toggledstate icons got destructive on the underlaying titlebar decor (and, because it doesn’t work to give toggledstate icons the tr.png icon as “background”, I got stuck on that front (because the toggledstate icons don’t inherit the underlaying decor statements, and you must do a destructive colorset definition to get them in line with eachother)).
So it would work by just giving a bit more height for titlebar, but I’m going for the Vector approach first.

Oh, and I hope my babblings are actually any use for someone :laughing:

A quick question about the Vector’s.
I haven’t played around with them before, so I would like to know if I’m doing this correctly.
I want to draw a black line using vectors, which would end up being something like the following ascii:

|        |
|        |
|        |

This is what I tried:
Vector 4 0x0@0 0x100@0 100x100@0 100x0@0
I only get one line drawn with the above definition.

Question: where does Vector take it’s colours for bg, sh, hi, from?

It gets them from the @numbers:

It’s possible that your lines are falling outside the button area when scaled down - I found that if I put a line too close to the edge, they would vanish.

Try the same 20% into the icon box on all sides and see of the image shows up. you can tune it from there.

Thanks, I did read that part from the manual, I meant where do the actual colours come from? There is no colorset specification.

Tried to lower down from 100% and now I can see the lines :slight_smile:
Only that it all comes out upside down :open_mouth:

Sorry, I misunderstood. I think the colorset used is the

Style * colorset X Style * colorset Y
ones that you’d use to specify the color of titlebar suchlike.

I meant

Style * Colorset X Style * HilightColorset Y
obviously :slight_smile:

Now I got it working! :mrgreen:

My buttonstyle section is now something like 53 lines :laughing:
But the result looks just amazing!
Here’s an example of a inactive window (other icons get hidden exept toggled state icons on inactive windows):

I didn’t have any idea how flexible this stacking of non-destructive styles could be. 8)

Next question: Can you use if-statements in there somehow?
if [ the next icon to me (me=icon) is in toggled state ]
don’t draw the edge of Vector on that side
Or something?

Very nice. clean and distinctive.

I don’t think you can use conditonals in decors. I get the impression they are handled like functions and menus - compiled once and then used and reused. I’d guess that you’d need to trap a change of toggle state, (re-)define a decor for that permutation, assign it to the window and possibly do a recapture just to make sure it displayed properly. If you did all the perms, that’d be what? counting the possible dividing lines to be toggled. If you only want to change the interior lines between buttons, that gives you 2^4 states or 16 different decors to pre-define. That’d be doable. Then you just need to trap the toggle and change decors according to the news state



Could you be so kind and provide me with and example of trapping a change of toggle? I suppose it involves FvwmEvent?
Actually there wouldn’t need to be a check in any other buttons than 3 and 5, as they are the only ones (on “default”) which are located side by side and can be toggled. (so basicly just 2 decors, right?)

I don’t think you can catch button toggle events as such. I was thinking more along the lines of bind the click action of the button to a function and have that function re-assign the decor in addition to its normal duties. I suppose you could catch the actions that are the results of such toggling, like sticking, shading, etc.

*FvwmEvent: Cmd
*FvwmEvent: PassId
*FvwmEvent: windowshade FuncResetDecor


I don’t think you can catch button toggle events as such

The bit I’m fuzziest on is how to divine the state of the buttons in order to select the decor. Selection is easy - call the decors Decor0000, Decor0001, … and just concatenate the variables. But you still need to set them. I’ve seen that recently - I just wish I could remember where.

If you mean how do you conditionally apply decors already defined to windows, I’d use a function that gets called based on some Event you’ve defined previously, hence:

DestroyFunc foo
AddToFunc foo
+ I ThisWindow ("condition") UseDecor <some_decor_name>
+ I UpdateStyles

Assuming that’s what you were asking, of course…

– Thomas Adam

Wait a minute! Doesn’t that mean I could use just the basic Matching in there, then?

mouse 5 T A FunckyFunc

AddToFunc FunckyFunc
+ I Test (Shaded) ChangeDecor DecorWithoutVectorInMiddle
+ I WindowShade


EDIT: I should learn how to push refresh button before posting :laughing:

Perhaps, but you’d have to change your syntax. Assuming the window your shading has focus, you can use (in place of how you have it defined):

 + I Current (Shaded) ChangeDecor .....

The whole point of using FvwmEvent was so that it was done on-the-fly.

– Thomas Adam

Oh, I see. This just keeps getting niftier and niftier.