Subject: FVWM: transparent gradients

From: Klaus Umbach <[email-masked]>
Date: Wed, 1 Oct 2003 18:46:01 +0200

Hello List,

is it possible to have transparent gradients?
If yes, how can I do that?

My goal is to make the title and borders of the inactive windows
transparent, but I want to keep the design of the active window.

Best regards
	Klaus Umbach

--
5) People say Linux is ugly. How does that make you feel?
Torvalds: They'll be the first against the wall when the revolution comes.
	  Let's see just how ugly they think it is when they have a few
	  bulletholes in them.

--
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: Wed, 1 Oct 2003 21:43:00 +0300

> transparent, but I want to keep the design of the active window.

This is possible, something like:

  TitleStyle    AllInactive Colorset 1 -- flat
  AddTitleStyle AllInactive Colorset 2 30     # alpha == 30% here

  TitleStyle    AllActive   Colorset 2 -- raised

  BorderStyle                   -- UseTitleStyle
  ButtonStyle   All AllInactive -- UseTitleStyle flat
  ButtonStyle   All AllActive   -- UseTitleStyle raised

  Colorset 1 RootTransparent buffer, fg gray80, bg average
  Colorset 2 fg #301058, VGradient 40 #a17aa1 #714a71, bg average

  Style * Colorset 1, HilightColorset 2
  Style * BorderColorset 1, HilightBorderColorset 2

Seems to work well.

Regards,
Mikhael.

---

From: Klaus Umbach <[email-masked]>
Date: Wed, 1 Oct 2003 22:14:20 +0200

>   Style * BorderColorset 1, HilightBorderColorset 2

Yes, that works fine, but that's not what I meant.
In your example the Colorset is completely transparent.
I want the transparent Colorset tinted with a gradient.

I want this to be semi-transparent.
Colorset 10 Vgradient 255 3 #aaaaaa 15 #888888 50 #aaaaaa 20 #888894, bg grey75, fg grey90, fg_alpha 90, fgsh Black

Sorry for my bad explanation in the last mail. :-)

regards
Klaus

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 1 Oct 2003 23:38:03 +0300

> Yes, that works fine, but that's not what I meant.

I rarelly misunderstand questions.

> Colorset 10 Vgradient 255 3 #aaaaaa 15 #888888 50 #aaaaaa 20 #888894, bg grey75, fg grey90, fg_alpha 90, fgsh Black

Set this into the Colorset 2 line in my example above and it is done.
You may want to change the alpha value from 30 to 60 and change "raised"
to "flat".

Regards,
Mikhael.

---

From: Klaus Umbach <[email-masked]>
Date: Thu, 2 Oct 2003 04:47:28 +0200

> I rarelly misunderstand questions.

Ehrm, yes. I guess you are trained in not misunderstanding questions.
:-)

OK, I got it now and it works how I wanted it, but there is still one
little problem. I have a frame inside my title, made with your PNGs, but
I don't want them in my buttons, where they appear when I set 
	BorderStyle -- UseTitleStyle
But when I don't do it, the Buttons don't use the background, but the
average color.

  AddTitleStyle InActive Pixmap t/title_left.png -- Flat Left
  AddTitleStyle InActive TiledPixmap t/title_top.png -- Flat Top
  AddTitleStyle Inactive Pixmap t/title_right.png -- Flat Right
  AddTitleStyle InActive TiledPixmap t/title_bottom.png -- Flat Bottom
	
Thats how I made the frame inside the title

and I made a picture:
http://doppelhertz.homelinux.org/screenshots/snipsnap.png

So, how can I remove the frame in the buttons?

best regards
	Klaus

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 2 Oct 2003 23:11:50 +0300

> 	BorderStyle -- UseTitleStyle

You mean "ButtonStyle" here.

> So, how can I remove the frame in the buttons?

Well, if you don't want titlebar buttons to enherit all title settings,
then don't use UseTitleStyle. Separately apply semi-transparency to
title and to buttons, like:

   TitleStyle         AllInactive Colorset 1 -- flat
   AddTitleStyle      AllInactive Colorset 2 60

   ButtonStyle    All AllInactive Colorset 1 -- flat
   AddButtonStyle All AllInactive Colorset 2 60

   ButtonStyle    All AllInactive -- !UseTitleStyle flat
   ButtonStyle    All AllActive   --  UseTitleStyle flat

If this does not help, then provide all relevant TitleStyle/ButtonStyle/
Colorset lines. Or better yet, convert your full configuration (or just
decorations) to fvwm-themes format, so I and hunderds of others may
trivially load your theme.

Regards,
Mikhael.

---

From: Klaus Umbach <[email-masked]>
Date: Fri, 3 Oct 2003 20:43:42 +0200

> trivially load your theme.

How can I convert that? Is there a script?

Before I let anyone read my configuration, I have to clean it up a
little, before it gets awkward.

Regards
Klaus

---

From: Mikhael Goikhman <[email-masked]>
Date: Fri, 3 Oct 2003 23:50:08 +0300

On 03 Oct 2003 20:43:42 +0200, Klaus Umbach wrote:
> > Or better yet, convert your full configuration (or just

You should convert by hand, of course. It is not hard. You start with one
.fvwm2rc file and end up with several files (fvwm-themes components).

There is a strict division to components, one command that belongs to one
component should never appear in another component. Some complex commands
(like TitleStyle) should be split between components, for example,
"TitleStyle Height MinHeight" and only this belongs to buttons component.
"TitleStyle LeftJustified -- flat" and only this belongs to "windowlook".
The rest of TitleStyle setting decoration colors/images belongs to "colors".

You may browse all existing themes in 0.6.2 or 0.7.0 (from cvs) to get an
idea of what commands should go to each component. Then go through your
.fvwm2rc, command by command, and place them to one or another component.

Another approach (probably better) is to start with an empty theme and
add complete components one by one, then test every new added component.
In the end you end up with your own theme that is easly distributable if
done correctly.

> little, before it gets awkward.

If you want to clean up your configuration anyway, it is better to start
with an empty theme "dualprinzip" and build it step by step. Start with
simple components "background", "menustyles", "globalfeel", "windowlook",
"buttons" and "colors". Just mimic exactly the way other themes are done.
After all these work, you may start to add modules. Ask if needed.
There is documentation, including FAQ.

Regards,
Mikhael.