On Fri, 7 Mar 2008 05:46:33 +0100 Jesús Guerrero <[EMAIL PROTECTED]> wrote:
Slight correction on NEWS Attached. -- Jesús Guerrero <[EMAIL PROTECTED]>
diff -r -U3 fvwm/ChangeLog fvwm/ChangeLog --- fvwm/ChangeLog 2008-03-07 05:34:21.000000000 +0100 +++ fvwm/ChangeLog 2008-03-07 05:28:14.000000000 +0100 @@ -19,6 +19,14 @@ *fvwm/doc/commands/MenuStyle.xml added the menustyle FlatSeparators documentation + *fvwm/doc/commands/TitleStyle.xml + added documentation for the ButtonWidth patch + + *fvwm/frame.c + *fvwm/screen.h + *fvwm/builtins.c + patched for ButtonWidth + 2008-02-29 Viktor Griph <griph(at)dd(dot)chalmers(dot)se> * fvwm/add_window.c (setup_frame_window): diff -r -U3 fvwm/doc/commands/TitleStyle.xml fvwm/doc/commands/TitleStyle.xml --- fvwm/doc/commands/TitleStyle.xml 2008-03-07 05:33:39.000000000 +0100 +++ fvwm/doc/commands/TitleStyle.xml 2008-03-07 05:24:09.000000000 +0100 @@ -25,6 +25,11 @@ >MinHeight <optional ><replaceable>num</replaceable ></optional + ></arg + ><arg choice='opt' + >ButtonWidth <optional + ><replaceable>num</replaceable + ></optional ></arg> </cmdsynopsis> @@ -36,6 +41,9 @@ sets the title bar's height to an amount in pixels. <fvwmopt cmd="TitleStyle" opt="MinHeight"/> sets the minimal height in pixels of the title bar. +<fvwmopt cmd="TitleStyle" opt="ButtonWidth"/> +Sets the width of the title bar buttons. Setting a width +of 0 or no width uses the title height, as before. Defaults are <emphasis remap='I'>Centered</emphasis>, the window's font height and no minimal height. diff -r -U3 fvwm/fvwm/builtins.c fvwm/fvwm/builtins.c --- fvwm/fvwm/builtins.c 2008-03-07 05:33:39.000000000 +0100 +++ fvwm/fvwm/builtins.c 2008-03-07 05:13:38.000000000 +0100 @@ -492,6 +492,21 @@ if (action) action += next; } + else if (!do_add && StrEquals(parm,"buttonwidth")) + { + int width = 0; + int next = 0; + + sscanf(action, "%d%n", &width, &next); + + if (decor->button_width != width) + { + decor->button_width = width; + decor->flags.has_changed = 1; + } + if (action) + action += next; + } else if (!do_add && StrEquals(parm,"MinHeight")) { int height = 0; diff -r -U3 fvwm/fvwm/frame.c fvwm/fvwm/frame.c --- fvwm/fvwm/frame.c 2008-03-07 05:33:38.000000000 +0100 +++ fvwm/fvwm/frame.c 2008-03-07 05:13:38.000000000 +0100 @@ -1369,7 +1369,14 @@ tb_thick = fw->title_thickness; nbuttons = fw->nr_left_buttons + fw->nr_right_buttons; nbuttons_big = 0; - b_length = tb_thick; + if (fw->decor->button_width == 0) + { + b_length = tb_thick; + } + else + { + b_length = fw->decor->button_width; + } t_length = tb_length - nbuttons * b_length; if (nbuttons > 0 && t_length < MIN_WINDOW_TITLE_LENGTH) { diff -r -U3 fvwm/fvwm/screen.h fvwm/fvwm/screen.h --- fvwm/fvwm/screen.h 2008-03-07 05:33:38.000000000 +0100 +++ fvwm/fvwm/screen.h 2008-03-07 05:13:38.000000000 +0100 @@ -286,6 +286,7 @@ #endif int title_height; /* explicitly specified title bar height */ int min_title_height; + int button_width; /* titlebar buttons */ TitleButton buttons[NUMBER_OF_TITLE_BUTTONS]; TitleButton titlebar; diff -r -U3 fvwm/NEWS fvwm/NEWS --- fvwm/NEWS 2008-03-07 05:34:21.000000000 +0100 +++ fvwm/NEWS 2008-03-07 05:29:47.000000000 +0100 @@ -10,6 +10,7 @@ - Added new condition masks: HasTitle, HasBorders, TitleAtBottom, TitleAtTop, TitleAtLeft, TitleAtRight - Added new menu separator menustyle: FlatSeparator + - Added new titlestyle: ButtonWidth * Bug fixes: