Subject: FVWM: Vector/Pixmap feature suggestions

From: An Thi-Nguyen Le <[email-masked]>
Date: Thu, 17 May 2001 10:41:43 -0500

Version: current CVS

There's already @0 for the shadow color and @1 for the highlight color 
when drawing vector lines for buttons.  Is it a good idea to add @2 and @3 
or something like that for the foreground and background color?

Also, for pixmaps in general, would it be possible to have colors in the 
xpm named 'Highlight' and 'Shadow' which would get cast to the highlight 
and shadow colors (and maybe 'Foreground' or 'Background')?  ctwm does this, 
and I think maybe CDE but it's been a while.

-- 
An Thi-Nguyen Le
|When one knows women one pities men, but when one studies men,
|one excuses women.
|		-- Horne Tooke
--
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: Dan Espen <[email-masked]>
Date: Thu, 17 May 2001 13:07:54 -0400

> or something like that for the foreground and background color?

Buttons don't have foreground and background colors.
Only "Solid colorname", which I guess you could take to be
the background.  I suppose you could use the HilightFore color
as the foreground.

As I remember, we've had a few comments about not being able to
"lift the pen off the paper" while drawing vectors, and supporting
a background color would do that.

Still, if you really want to go all out with buttons, using pixmaps
gives a lot of control.

> and I think maybe CDE but it's been a while.

Since pixmaps support the color "None", you get a "Background" by using
"None".

I've seen the references to symbolic colors in XPMs but never seen
them used.

Other users have asked about  supporting other image formats,  besides
xpm.   Supporting other formats would  confound this  feature.  For my
own use, I'd  look at further extensions  as bloat.  Thats not to say,
I'm absolutely against  them.  I'm just trying to  make the point that
there should be a clear benefit to adding more features.

Both of  these   ideas are interesting.  Instead  of   asking if these
features are a good idea, point out the benefits.

-- 
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
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: An Thi-Nguyen Le <[email-masked]>
Date: Thu, 17 May 2001 13:32:35 -0500

[Dan Espen - Thu, 17 May 2001 12:11:52 PM CDT]
> the background.  I suppose you could use the HilightFore color

Buttons take the highlight/shadow/foreground/background colors that are 
given to the border.  I know this, because I have a theme that uses this 
to get proper vector line colors for different focus/unfocus colors.  
Generating 50 different pixmaps that are basically the same, except for 
the color, seems rather wasteful if it can be taken care of in some more
automatic way.

For instance, I currently use highlight/shadow colors for this:

  # A low bar.
  AddButtonStyle 1 Vector 5 14x63@1 77x63@1 77x77@1 14x77@1 14x63@1
  
  # A square. with a thicker top side
  AddButtonStyle 4 Vector 7 14x14@1 77x14@1 77x21@1 14x21@1 14x77@1 \
                            77x77@1 77x14@1
  
  # A simple X
  AddButtonStyle 2 Vector 2 14x14@1 42x42@1 
  AddButtonStyle 2 Vector 2 42x49@1 14x77@1 
  AddButtonStyle 2 Vector 2 77x14@1 49x42@1
  AddButtonStyle 2 Vector 2 49x49@1 77x77@1

This yields BlackBox-style buttons; being able to have the vector lines
the same color as the current foreground of the border (now that we have
colorsets, that is a valid thing).  Just using the shadow color or the
highlight color is sometimes not what you want; for instance, maybe you 
want the vector lines to be in the same color as the foreground, which 
happens to be black, but that screws up highlight/shadow for light-colored 
themes.

> a background color would do that.

Pish posh; you can use AddButtonStyle to "lift the pen off the paper".
Colorsets are around, so things have background/foreground/highlight/shadow 
whether you want them or not.

> Still, if you really want to go all out with buttons, using pixmaps

I do *not* want to go all out with buttons.  I just want to be able to 
specify buttons that go with the current foreground color.  I do *not* 
want to suggest that fvwm embed gimp inside it.

> Since pixmaps support the color "None", you get a "Background" by using

I *know* that.  I've used it.

> I've seen the references to symbolic colors in XPMs but never seen

Download and try out ctwm.  It yields, for instance, interesting raised 
patterns on title bars without having to create different pixmaps for 
every single color combo anyone could want.

> there should be a clear benefit to adding more features.

Well, yes.  I don't suggest things just to suggest things.  If I
didn't think there would be some benefit, I wouldn't try.  Of course,
technically there's no "clear" benefit to having retracting icon titles,
button vectors, or specifying different cursors using pixmaps, so one
might as well just use wm2, hacked for certain key strokes, and be done 
with it.

-- 
An Thi-Nguyen Le
|Let me put it this way: today is going to be a learning experience.

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 17 May 2001 21:51:44 +0000

> or something like that for the foreground and background color?

I actually have a patch which does what you describe for a month already. :)

I do think that this is useful. I didn't mention this patch yet, because
we are now in the feature freeze and I am not very comfortable with a
limited vector functionality. To fully benefit an ability to draw using
background and foreground button colors we should extend vectors (lines)
to areas (rectangles, probably circle segments and so on). Lines are
usually only useful when drawing reliefs using shadow and highlight colors.
So, all this should be thought-out first.

> and I think maybe CDE but it's been a while.

Yes, such xpm's are used in CDE, for example in its panel.

This would be useful to have. Currently we, in fvwm-themes, solved this
problem by having gray reliefs for panel pixmaps. This works ok for most
of color schemes, but not for all. Of course the correct solution is to
use highlight and shadow colors in xpm (also called topShadowColor and
bottomShadowColor), so even on the red background the arrows would look
nice, with a relief based on the red color and not on the hardcoded gray.

Regards,
Mikhael.