Subject: FVWM: Individual vector button color

From: kevin leung <[email-masked]>
Date: Sun, 5 Oct 2003 10:54:41 +0800 (CST)

I am working fine with fvwm-2.5.7 for a week. There is
only a very minor problem that bothers me.

Please take a look at one of my screenshots first:
http://chaoith.no-ip.org:30002/shot-2.png

As you may have seen, Button 1 is in the same
foreground color as the title, which is extremely
difficult to see. What I really want is to override
the button 1 foreground color to something darker.
fvwm fails me. It is very likely that I configure the
wrong way.

Here is my fvwm2rc. Any comments are welcomed.

#Active Window
Colorset 2 bg #3e71aa, fg white

#Active button 1
Colorset 15 bg #e0e8f5, fg black

#Active titlebar
Colorset 21 HGradient 200 #e0e8f5 #728daa

Style * HilightColorset 2

AddToDecor DefaultDecor

+ TitleStyle Active (Colorset 21 -- flat) Inactive
(Colorset 22 -- flat)

+ ButtonStyle 1 Activeup (Colorset 15 -- flat)
Inactive (Colorset 17 -- flat)

#Using @2 because fvwm swaps @2 with @3, mystery.
#@2 represent the foreground color in this case.
+ AddButtonStyle 1 Vector 4 50x80@2 20x20@2 80x20@2
50x80@2

Thanks,
Kevin L

_________________________________________________________
「向左走 向右走」趣怪 VoiceMail 歡迎詞....
http://voicemail.yahoo.com.hk/
--
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: Sun, 5 Oct 2003 10:13:00 +0300

> #@2 represent the foreground color in this case.

In cvs, @2 represents bg not fg, as documented.

> + AddButtonStyle 1 Vector 4 50x80@2 20x20@2 80x20@2 50x80@2

Try to replace this with:

AddButtonStyle 1 AllInactive Vector 4 50x80@2 20x20@2 80x20@2 50x80@2
AddButtonStyle 1 AllActive   Vector 4 50x80@0 20x20@0 80x20@0 50x80@0

Regards,
Mikhael.

---

From: kevin leung <[email-masked]>
Date: Sun, 5 Oct 2003 20:25:53 +0800 (CST)

> AddButtonStyle 1 AllActive   Vector 4 50x80@0

It works. But the button foreground is in black. I
have to add another line:

#Active Window
Colorset 2 bg #3e71aa, fg white, sh #728daa

It is ok if I only want to change 1 button. What about
if I want to change 2 buttons? 3 buttons? 4 buttons?
It seems that there is no way to do it because I can
only specify 1 shadow color. It would be really nice
if the button colorset can override the default style
colorset.

Colorset 15 bg #e0e8f5, fg #728daa
+ ButtonStyle 1 Activeup (Colorset 15 -- flat)
Inactive (Colorset 17 -- flat)
AddButtonStyle 1 AllActive   Vector 4 50x80@3
 20x20@3 80x20@3 50x80@3

In this way, we are not constrained to only one shadow
color or one foreground color in "Style *".

Just a kind suggestion. ;)

Thanks.
Kevin L

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 5 Oct 2003 16:35:12 +0300

On 05 Oct 2003 20:25:53 +0800, kevin leung wrote:
> It works. But the button foreground is in black. I have to add another
> line:
> 
> #Active Window
> It is ok if I only want to change 1 button. What about if I want to
> change 2 buttons? 3 buttons? 4 buttons? It seems that there is no way
> to do it because I can only specify 1 shadow color. It would be really
> nice if the button colorset can override the default style colorset.
> 
> ButtonStyle 1 Activeup (Colorset 15 -- flat) Inactive (Colorset 17 -- flat)
> AddButtonStyle 1 AllActive   Vector 4 50x80@3 20x20@3 80x20@3 50x80@3
> 

Maybe. I.e. when ButtonStyle Colorset is specified without alpha, then it
fully replaces the base titlebar colorset for things like vector button
drawing. Only Olivier knows whether it is easy to apply this logic.

When started to reply, I thought that currently you may define 2
shadow/hilight sets of colors, one for right buttons and one for left
buttons using MultiPixmap (beware, it will be renamed to MultiPart, since
it works with colorsets not [just] pixmaps). But I tested, the situation
here is the same, the base titlebar colorset (Style * Colorset) is always
used for Vector buttons regardless of the fact other colorsets fully
override it.

Regards,
Mikhael.