Re: FVWM: Bug in button style set with Vector and AllToggled state (was Re: Maximize/Restore buttons)

From: Dominik Vogt <dominik.vogt_at_gmx.de>
Date: Fri, 16 Jul 2004 11:16:43 +0200

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:
> > On Thu, Jul 15, 2004 at 04:27:38PM -0300, romildo_at_gentoo.malaquias.no-ip.org wrote:
> > >
> > > I want to set up one of two different images on button 4
> > > in the title bar, depending on the maximization state
> > > of the window. This button is to be used as a toggle of
> > > the mazimation state of window (maximize/restore).
> > > How can I configure that?
> >
> > Below is an excerpt from my configuration file where
> > I try to set the maximize/restore buttons as
> > described above.
> >
> > 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. Any help? I am running
> > FVWM 2.5.10 on Gentoo Linux.
> [...]
> > #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)
>
> Can anybody confirm this as a bug?

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.

Ciao

Dominik ^_^ ^_^

 --
Dominik Vogt, dominik.vogt_at_gmx.de
Reply-To: dominik.vogt_at_gmx.de


--
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 - 05:46:22 BST

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