FVWM: Re: Maximize/Restore buttons

From: <romildo_at_uber.com.br>
Date: Fri, 16 Jul 2004 09:43:00 -0300

On Fri, Jul 16, 2004 at 11:16:43AM +0200, Dominik Vogt wrote:
> On Fri, Jul 16, 2004 at 12:58:34AM -0300, romildo_at_uber.com.br wrote:
> > On Thu, Jul 15, 2004 at 11:24:53PM -0300, romildo_at_gentoo.malaquias.no-ip.org wrote:

> > > Below is an excerpt from my configuration file where
> > > I try to set the maximize/restore buttons

> > > But it is not working: the vector image of the restore
> > > button (the toggled button 4, when the window is
> > > maximized) is not being drawn.

> > > #Button 4: Maximize
> > > AddButtonStyle 4 \
> > > AllActive (HGradient 128 Azure2 Azure1) \
> > > AllInactive (HGradient 64 Grey80 Grey90) \
> > > AllNormal (7 20x20_at_0 90x20_at_0 90x25_at_0 20x25_at_0 20x80_at_0 90x80_at_0 90x20_at_0) \
> > > AllToggled (10 40x70_at_0 10x70_at_0 10x10_at_0 70x10_at_0 70x40_at_0 40x40_at_4 90x40_at_0 90x90_at_0 90x40_at_0 40x40_at_0)

> > It seems that there is a bug with "AddButtonStyle AllToggled (Vector ...)"
> > in the command above. Replacing it with other button styles does
> > work. For Instance:
> >
> > AddButtonStyle 4 AllToggled (MiniIcon)
> >
> > or
> >
> > AddButtonStyle 4 AllToggled (Pixmap maximizeA.xpm)

Further testing shows that the vector for the toggled
button is in fact drawn, but with a color different from
the colors used for all other buttons (which is very
strange), and it can not be seen with the style used
(HGradient 128 Azure2 Azure1).

If I change the line
   AllActive (HGradient 128 Azure2 Azure1)
to
   AllActive (Solid Red)
for instance, the toggled active vector can be seen.

I have found also that if I replace the HGradient
style for all active buttons with an equivalent
colorset style, the color used to draw the active
toggled button is visible:

  Colorset 8 HGradient 64 Azure2 Azure1
  ButtonStyle All - Clear
  ButtonStyle 4 - MwmDecorMax
  AddButtonStyle 4 \
    AllActive (Colorset 8) \
    AllInactive (HGradient 64 Grey80 Grey90) \
    AllNormal (7 20x20_at_0 90x20_at_0 90x25_at_0 20x25_at_0 20x80_at_0 90x80_at_0 90x20_at_0) \
    AllToggled (12 40x60_at_1 20x60_at_1 20x20_at_1 60x20_at_1 60x40_at_1 \
                            40x40_at_4 80x40_at_1 80x80_at_1 40x80_at_1 40x40_at_1 40x45_at_1 80x45_at_1)

So, why does the use of the colorset style differ from
the hgradient style, considering that the colorset
is defined exactly like the hgradient style?

> It's the mysterious syntax of the ButtonStyle/AddButtonStyle
> commands. There is probably not a single person who understands
> how it works exactly. This works:
>
> ButtonStyle 4 - Clear
> ButtonStyle 4 - MwmDecorMax
> ButtonStyle 4 AllActive HGradient 128 Azure2 Azure1
> ButtonStyle 4 AllInactive HGradient 64 Grey80 Grey90
> ButtonStyle 4 AllNormal 7 20x20_at_0 90x20_at_0 90x25_at_0 20x25_at_0 20x80_at_0 90x80_at_0 90x20_at_0
> ButtonStyle 4 AllToggled 10 40x70_at_0 10x70_at_0 10x10_at_0 70x10_at_0 70x40_at_0 40x40_at_4 90x40_at_0 90x90_at_0 90x40_at_0 40x40_at_0
>
> You don't want to use AddButtonStyle because it does not erase the
> effects that were already applied to the buttons.

This woks partially. The vector is drawn, but both
HGradient styles are not used. In my understanding
the ButtonStyle commands for AllNormal and AllToggled
buttons are replacing the HGradient styles. If last
four ButtonStyle commands are replaced by AddButtonStyle,
the gradients are used (but again the vector is draw
in an unsuitable color).

Any ideas?

Romildo
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Fri Jul 16 2004 - 07:45:13 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:56 BST