Subject: FVWM: picky picky : shadow/hilight colors

From: Jos <[email-masked]>
Date: Fri, 17 Dec 1999 14:18:38 +0100

Hi!

I'd like to mimic the CDE enviroment in the
'solaris style' using fvwm2 as much as possible. This one has mwm type 
borders and has a red-ish title background color and border color when 
the window has the input focus. So in fvwm, I chose MWMBorders and I
chose the 
right background color (I used a sreenshot and gimp to determine that).

Now, the window layout looks exactly like in the solaris screenshot. 
However, the shadow and hilight colors of the border look different.
(With
this, I mean the colors that are calculated from the background color,
to 
give the borders a 3d look) So my question: is it possible to manually
set these
hilight and shadow colors?  (Ok, I'm being somewhat picky..)

regards,

Jos.

[email-masked]
--
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: Tim Phipps <[email-masked]>
Date: Fri, 17 Dec 1999 13:54:00 +0000

Jos wrote:
> So my question: is it possible to manually set these
Yes, but not with the stable release.  In the current beta you can use
FvwmTheme to
create a colorset with whatever shadow and hilight colors you want.  You
then have to configure fvwm2 and the modules to use the colorset (see
the FvwmTheme man page for examples).

Cheers,
Tim.

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 17 Dec 1999 16:03:27 +0100

On Fri, Dec 17, 1999 at 02:18:38PM +0100, Jos wrote:
> give the borders a 3d look)

If someone could come up with an algorithm that duplicates the CDE
shadow/hilight colour calculations this would be very welcome.
CDE's algo is quite clever and you can see that a lot of know-how
went into it.

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
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: Tim Phipps <[email-masked]>
Date: Fri, 17 Dec 1999 17:33:44 +0000

> CDE's algo is quite clever and you can see that a lot of know-how
What I would really like is for someone who knows Motif/CDE to write an
app that can tell fvwm what pixels CDE is using for its colorsets. That
way we would get access to the relief calculations and integration with
the CDE themes.  The app wouldn't even have to map its window, just
create it, use XmGetShadowColors() and then tell fvwm about it.  Same
goes for KDE and Gnome.

Cheers,
Tim.

---

From: Dominik Vogt <[email-masked]>
Date: Fri, 17 Dec 1999 20:07:55 +0100

> create it, use XmGetShadowColors() and then tell fvwm about it.  Same

As far as I know CDE even adapts the actual colours it uses to your
display hardware.  That is why CDE's colours look the same regardless
of the machine you have.  This is far beyond everything we tried to
code yet.

Bye

Dominik ^_^

---

From: Pete Forman <[email-masked]>
Date: Mon, 20 Dec 1999 09:08:28 +0000 (GMT)

Dominik Vogt writes:
 > display hardware.  That is why CDE's colours look the same
 > regardless of the machine you have.  This is far beyond everything
 > we tried to code yet.

AFAIK the matching of device independent colours to the display
hardware is done in Xcms rather than CDE.  That is in the core X11
library and so is used by FVWM already.  Of course it needs to have a
file set up for the particular video card and monitor being used.

If you really want to get the same colours as CDE, link in the Motif
library and call XmGetColors().  That returns foreground, select, and
shadow colours for a given background.  In my experience the
underlying algorithm is different in each of Motif 1.1, 1.2 (CDE 1.0),
and 2.1 (CDE 2.1).
-- 
Pete Forman
Western Geophysical
[email-masked]
--
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: Dominik Vogt <[email-masked]>
Date: Mon, 20 Dec 1999 10:59:00 +0100

On Mon, Dec 20, 1999 at 09:08:28AM +0000, [email-masked] wrote:
>...

Ah, thanks for the info.  The algorithm that lesstif uses does
indeed look like what CDE does.  Dan, do you feel inclined to
port lesstif's algorithm to fvwm?  I've attached the source file
with the code.  Look for the '_XmColorProcDefaultProc' function.

Bye

Dominik ^_^

-- 
Dominik Vogt, Agilent Technologies, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/464-4596, fax: 07031/464-3883, [email-masked]
--
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: Dominik Vogt <[email-masked]>
Date: Mon, 20 Dec 1999 11:58:00 +0100

> with the code.  Look for the '_XmColorProcDefaultProc' function.

... and the attachment ...

Bye

Dominik ^_^