Subject: FVWM: Vector buttons with a "shadow" effect

From: Marcus Lundblad <[email-masked]>
Date: Sat, 19 Oct 2002 20:18:05 +0200 (CEST)

I was defining 4Dwm-like buttons.

So a maximise button would look something like this (presuming you have
fixed font, run pine :-))

  #############
  #           ##
  #           ##
  #           ##
  #           ##
  ##############
   #############

I don't find a way to do this properly, since those "offsets" should be a
fixed distance (1 pixel).

I made the following definitions:

ButtonStyle 1 3 23x58@2 77x58@2 77x42@2 
AddButtonStyle 1 3 23x58@2 23x42@2 77x42@2
AddButtonStyle 1 3 82x47@2 82x60@2 28x60@2
ButtonStyle 2 3 20x75@2 75x75@2 75x20@2
AddButtonStyle 2 3 20x75@2 20x20@2 75x20@2	
AddButtonStyle 2 3 80x30@2 80x80@2 30x80@2
ButtonStyle 4 3 42x58@2 58x58@2 58x42@2 
AddButtonStyle 4 3 42x58@2 42x42@2 58x42@2
AddButtonStyle 4 3 61x47@2 61x61@2 47x61@

This works well for a certain title bar size.

I guess I could write a script that calculates theese according to font
size, but it seems a bit teedious.

Is there a better way of doing it?

I would suggest having some option to add an offset to vector definitions.
Like for example:

AddButtonStyle 1 3 23+1x58+1@2 23x42@2 77-1x42@2
Where (+1 and -1 is offsets). (Note that these doesn't nessesarily give
a portion of the above button, I just made it up...)

//Marcus

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Sat, 19 Oct 2002 18:40:01 +0000

> fixed font, run pine :-))

Yes, this is the only current possibility, write a script.
Or use (transparent) images.

> a portion of the above button, I just made it up...)

This is a good idea, that works mostly with offsets -1 and +1.

Another idea that would create a more proportional look is to be able
to fill recangles, not just draw lines, like:

  42x58@1 r58x42@1

Anyway, until someone implements one or another idea, you can't do much.

Regards,
Mikhael.

---

From: Marcus Lundblad <[email-masked]>
Date: Sun, 20 Oct 2002 00:21:21 +0200 (CEST)

> to fill recangles, not just draw lines, like:

Actually in fvwm 1.x this was the ONLY way to define buttons:
Like: (taken from a sample .fvwmrc for 1.24)

ButtonStyle 1 50x22
ButtonStyle 2 50x50
ButtonStyle 4 22x22

They were always rectabgles shaded implicitly

//Marcus