On Thursday 07 November 2002 1:26 pm, Jean-Marc Lasgouttes wrote: > >>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> On Wednesday 06 November 2002 2:24 pm, Jean-Marc Lasgouttes > > Angus> wrote: > >> Here is what I get with the document layout popup? Am I the only > >> one seeing this? > >> > >> JMarc > > Angus> No, I see it too. > > Angus> Would it make sense to add something like this (untested) code > Angus> to the resize code we already use to check that the labels fit > Angus> on the tab buttons? > > Alternatively, has anyone looked whether using "fdesign -compensate" > would be of any use? I have a vague recollection of having failed at > using it a long time ago, but maybe is it wother trying again. > > JMarc
Great suggestion, Jean-Marc. Before is doc1.png, after is doc2.png. To try yourself, apply the diff attached in the dir containing form_document.C Alternatively, apply fdesign.diff from the $LYX dir. Note that fl_adjust_form_size scales the height as well as the width: fl_scale_object(ob, max_factor, max_factor); Maybe you could try it out with the German locale set and see how the resulting dialogs look? (Incidentally, could we get a non-installed LyX to search in the right place for the .mo files (setting an environment variable eg?)). Angus
--- form_document.C.orig Thu Nov 7 13:49:36 2002 +++ form_document.C Thu Nov 7 13:52:23 2002 @@ -78,6 +78,7 @@ fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0); fl_end_form(); + fl_adjust_form_size(fdui->form); fdui->form->fdui = fdui; return fdui; @@ -239,6 +240,7 @@ fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0); fl_end_form(); + fl_adjust_form_size(fdui->form); fdui->form->fdui = fdui; return fdui; @@ -391,6 +393,7 @@ fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0); fl_end_form(); + fl_adjust_form_size(fdui->form); fdui->form->fdui = fdui; return fdui; @@ -458,6 +461,7 @@ fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0); fl_end_form(); + fl_adjust_form_size(fdui->form); fdui->form->fdui = fdui; return fdui; @@ -535,6 +539,7 @@ fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0); fl_end_form(); + fl_adjust_form_size(fdui->form); fdui->form->fdui = fdui; return fdui; @@ -684,6 +689,7 @@ fl_end_form(); + fl_adjust_form_size(fdui->form); fdui->form->fdui = fdui; return fdui;
<<attachment: doc1.png>>
<<attachment: doc2.png>>
? src/frontends/xforms/patch.diff Index: src/frontends/xforms/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/ChangeLog,v retrieving revision 1.597 diff -u -p -r1.597 ChangeLog --- src/frontends/xforms/ChangeLog 7 Nov 2002 00:21:28 -0000 1.597 +++ src/frontends/xforms/ChangeLog 7 Nov 2002 14:11:47 -0000 @@ -1,3 +1,10 @@ +2002-11-07 Angus Leeming <[EMAIL PROTECTED]> + + * forms/fdfix.sh: add "-compensate" to the args passed to fdesign + * forms/fdfixh.sed: generate the d-tors in a clean way. + * forms/fdfixc.sed: ensure that fl_adjust_form_size calls the form by + its correct name. + 2002-10-31 Herbert Voss <[EMAIL PROTECTED]> * FormGraphics.C (build, apply): get the rotate-list from the Index: src/frontends/xforms/forms/fdfix.sh =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/forms/fdfix.sh,v retrieving revision 1.17 diff -u -p -r1.17 fdfix.sh --- src/frontends/xforms/forms/fdfix.sh 5 Sep 2002 15:14:23 -0000 1.17 +++ src/frontends/xforms/forms/fdfix.sh 7 Nov 2002 14:11:47 -0000 @@ -51,7 +51,7 @@ fi # Create the initial .c and .h files FDESIGN=fdesign FDFILE=${BASENAME}.fd -(cd ${DIRNAME}; ${FDESIGN} -convert ${FDFILE}) +(cd ${DIRNAME}; ${FDESIGN} -convert -compensate ${FDFILE}) if [ $? -ne 0 ]; then echo "\"${FDESIGN} -convert ${FDFILE}\" failed. Please investigate." exit 1 Index: src/frontends/xforms/forms/fdfixc.sed =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/forms/fdfixc.sed,v retrieving revision 1.9 diff -u -p -r1.9 fdfixc.sed --- src/frontends/xforms/forms/fdfixc.sed 5 Sep 2002 15:14:23 -0000 1.9 +++ src/frontends/xforms/forms/fdfixc.sed 7 Nov 2002 14:11:47 -0000 @@ -33,6 +33,9 @@ s/fdui->form_\([^ ]*\) =/fdui->form =/ # 3. Rewrite "fdui->form_xxx->..." as "fdui->form->..." s/fdui->form_\([^ ]*\)->/fdui->form->/ +# 4. Rewrite "fdui->form_xxx)" as "fdui->form)" +s/fdui->form_\([^ ]*\))/fdui->form)/ + # Replace "forms.h" by FORMS_H_LOCATION in the #include directives s/#include \"forms\.h\"/#include FORMS_H_LOCATION/ Index: src/frontends/xforms/forms/fdfixh.sed =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/xforms/forms/fdfixh.sed,v retrieving revision 1.4 diff -u -p -r1.4 fdfixh.sed --- src/frontends/xforms/forms/fdfixh.sed 5 Sep 2002 15:14:23 -0000 1.4 +++ src/frontends/xforms/forms/fdfixh.sed 7 Nov 2002 14:11:47 -0000 @@ -99,9 +99,8 @@ d i\ # 2. Rewrite "} FD_xxx;" as "struct FD_xxx {" and append a d-tor. -s/} \(.*\);/struct \1 {/p -# When the wrappers are here, delete this line and the p-print command above -/struct/s/struct \(.*\) {/ ~\1();/ +s/} \(.*\);/struct \1 {\ + ~\1();/ # 3. Paste the contents of the hold space beneath it G