Subject: flat icon/border patch

From: [email-masked]
Date: Tue, 30 Nov 1999 20:43:36 -0800

I know flat icons are on the wish list but I wanted them now so I activated
'flat' and 'sunk' for BorderStyle with these two tidbits.  I dont know if this
will be the preferred method for flat icons and borders, but it made sense to
me.  The obvious drawback is that icon and window border flatness is not
disjoint.   If this is acceptable maybe someone w/ CVS access can plug it
or some variant in.

In border.c:
============

/****************************************************************************
 *
 *  Draws the relief pattern around a window
 *
 ****************************************************************************/
void RelieveWindow(FvwmWindow *t,Window win, int x,int y,int w,int h,
		   GC ReliefGC, GC ShadowGC, int hilite)
{
  XSegment seg[4];
  int i;
  int edge;

#ifdef BORDERSTYLE
  GC tmpGC;
  if(Scr.Focus != t) {
    if(GetDecor(t, BorderStyle.inactive.style) & FlatButton) { return; } 
    else if(GetDecor(t, BorderStyle.inactive.style) & SunkButton) {
      tmpGC = ReliefGC;
      ReliefGC = ShadowGC;
      ShadowGC = tmpGC;
    }}
  else {
    if(GetDecor(t, BorderStyle.active.style) & FlatButton) { return; } 
    else if(GetDecor(t, BorderStyle.active.style) & SunkButton) {
      tmpGC = ReliefGC;
      ReliefGC = ShadowGC;
      ShadowGC = tmpGC;
    }}
#endif

...

Also in border.c
================

void RelieveWindowHH(FvwmWindow *t,Window win, int x,int y,int w,int h,
		     GC ReliefGC, GC ShadowGC, int draw, int hilite)
{
    XSegment seg[4];
    int i = 0;
    int edge = 0, a = 0, b = 0;

    GC tmpGC;
    if(Scr.Focus != t) {
      if(GetDecor(t, BorderStyle.inactive.style) & FlatButton) { return; } 
      else if(GetDecor(t, BorderStyle.inactive.style) & SunkButton) {
        tmpGC = ReliefGC;
        ReliefGC = ShadowGC;
        ShadowGC = tmpGC;
      }}
    else {
      if(GetDecor(t, BorderStyle.active.style) & FlatButton) { return; } 
      else if(GetDecor(t, BorderStyle.active.style) & SunkButton) {
        tmpGC = ReliefGC;
        ReliefGC = ShadowGC;
        ShadowGC = tmpGC;
      }}

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