Subject: Re: Patch: FvwmScript - add ReliefDepth parameter to H/VDipSticks

From: Olivier Chapuis <[email-masked]>
Date: Thu, 6 Jan 2005 07:16:15 +0100

On Fri, Dec 24, 2004 at 07:42:18PM -0500, Lev Babiev wrote:
> 
> Hello all,
> 
> I recently started using FvwmScript as part of my setup. One of the 
> functions performed by the script is displaying CPU load, memory usage and 
> swap utilization. The output is displayed using small VDipSticks on my 
> "panel". Since these VDipSticks are rather small (11x56), having them sunk 
> and raised by 2 pixels results in a rather cluttered look (8 of 11 pixels 
> by width are taken up by "relief").
>

Can you post your Script?
 
> I created a patch to address this issue. The patch adds a new option for 
> VDipSticks and HDipSticks called ReliefDepth. This option allows setting 
> a number of pixels to raise/sink the dipstick by. The default value is 2, 
> so omitting the option would result in "normal" behavior and existing 
> scripts would not be affected.
> 

This option it interesting. I will just call it "ReliefThickness"
(to be consistent with, for example, FvwmIconMan).
What about extending this patch to all the widgets? And supporting
the ReliefThickness option at the head of the script for setting
the default? 
 
> The patch is fairly large due to the changes in files generated by 
> lex/yacc, the actual changes are fairly small. The patch file is located 
> here: http://crion.no-ip.org/fvwmscript-nrdip2.patch
> 

If there is no objection I will apply the patch. If you do an other
one you do not need to put the files generated by lex/yacc in it
(I can generate it).

Regards, Olivier
--
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]

---

From: Lev Babiev <[email-masked]>
Date: Thu, 6 Jan 2005 20:59:46 -0500 (EST)

> Can you post your Script?

Sure. It's still full of kludges, but it mostly works: 
http://crion.no-ip.org/monitor

> the ReliefThickness option at the head of the script for setting

This makes sense. I'll try to work on this when I get some time. Some 
widgets may need more changes than others, since the rest of the code 
assumes 2 pixel relief thickness.

> one you do not need to put the files generated by lex/yacc in it

Sounds good. I'll skip lex/yacc next time (and reduce patch size by a 
meaningful factor in the process :).

-- 
Lev

---

From: Lev Babiev <[email-masked]>
Date: Sun, 23 Jan 2005 12:42:14 -0500 (EST)

Hello All,

A while back I posted a patch to add ReliefDepth option to H/Vdipstick 
widgets of FvwmScript. Per comments from this list, I modified the patch 
to include other widgets and use a more consistent name "ReliefThickness"

The patch adds a new FvwmScript option called "ReliefThickness". This 
option controls the thickness of relief rectangles in most widgets. The 
new option is transparent, if user doesn't specify ReliefThickness for the 
script/widget, it will default to 2 (the current thickness of relief in 
FvwmScript).

The option is defined on both script and widget level. User can specify 
default ReliefThickess for the script, which would be inherited by all 
widgets. Alternatively user can specify ReliefThickness for specific 
widgets.

The only widget which doesn't support the option is Menu. Since menues are 
integrated together via a menubar, widget specific ReliefThickness would 
be hard to implement. Perhaps the solution to this would be to add 
MenuReliefThickness script level option that would specify relief 
thickness for all menues.

Also, PopupMenu only partially implements the option. The widget uses the 
ReliefThickness option when rendering a button, but not when rendering the 
actual menu (as the code for this is shared with Menu widget).

The patch can be found here: 
http://crion.no-ip.org/fvwmscript-reliefthickness.patch

An example script that prompted me to write the patch is here:
http://crion.no-ip.org/monitor

And the screenshot of the script is here:
http://crion.no-ip.org/mon_script.jpg