On Tue, Feb 17, 2004 at 11:44:30AM -0500, Chris Ross wrote:
> Dominik Vogt wrote:
> >The patch looks nice and simple, and I think I will apply it.  My
> >only concern is that it does not do any boundary checks.
> 
>   Reasonable.  I can add some boundary-checking.
> 
> >It should:
> >
> > - Check for negative and zero thickness.
> 
>   I didn't want to do this, because I thought that those were
> reasonable.  Zero works, and behaves as you would expect.  It
> makes the button "flat".  Do you want me to explicitly disallow
> this method of making the button flat, so that it must be done
> as a button style?

I don't really care whether it's possible or not.  But if the
thickness is 0, RelieveRectangle() should never be called.

>   As to negative, that doesn't work as expected, but I would've
> expected that to act as "Reverse" causes, and if it worked should
> be valid.  I also asked for any help in figuring out why that
> doesn't work.  Do you want me to just ignore it, so that if you
> want them sunken, you must Reverse either icon or normal?  This
> prevents you from being able to reverse all states, correct?
> What if someone wanted to do that?

RelieveRectangle() eventually calls do_relieve_rectangle() from
libs/Graphics.c.  This function does nothing for line_width <= 0.
It's easy to change by adding this piece of code at the beginning
of the function:

  if (line_width < 0)
  {
    GC tmpgc;

    line_width = -line_width;
    tmpgc = ReliefGC;
    ReliefGC = ShadowGC;
    ShadowGC = tmpgc;
  }

I wouldn't mind to add this to your patch.

> > - Limit the thickness to what fits in a button (you do not want
> >   to allow relief thickness 25000 in a button that is 10 pixels
> >   high).
> 
>   Right.  This is reasonable.  I'll take a look at how to do
> this...
> 
> >Please post replies below the quoted portions original mail on
> >this list.

Ciao

Dominik ^_^  ^_^
--
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 PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to