James Frye wrote: > Hi, > > It looks like I am going to be using Lyx a good bit in the next year or > so, and I would like to make a few modifications to make it easier for me > to use. I'd welcome any suggestions as to where to start looking.
Welcome aboard ;-) > A few of the things I have in mind are (in rough order of > priority/perceived difficulty): > > 1) Figure out how to add a font size specification to the > preferences.xforms init file. What it comes up with now is almost too > small to see, especially in things like the Math Panel. This is probably really easy, but a little tedious. I've gone and written a road map, more for my benefit than yours ;-) The stuff below will put you in a position to modify the preferences dialog and change the font sizes. First though, there's some grunt work. Good luck, Angus All xforms stuff is to be found in the src/frontends/xforms directory. The dialogs themselves are autogenerated from the .fd files to be found in the forms subdirectory therein. You'll find entries like: size: FL_DEFAULT_SIZE. You should probably start by ensuring that they are all self consistent. Currently it appears we use, FL_NORMAL_SIZE and FL_DEFAULT_SIZE in equal measure; I'd probably change all those DEFAULT entries to NORMAL with a little script #! /bin/sh for file in *.fd; do sed '/^size:/s/DEFAULT/NORMAL/' $file tmp cmp -s $file tmp && continue diff -u $file tmp mv -i tmp $file done Leaving these extras: ../xforms/forms/form_document.fd:size: FL_LARGE_SIZE ../xforms/forms/form_document.fd:size: FL_LARGE_SIZE ../xforms/forms/form_document.fd:size: FL_LARGE_SIZE ../xforms/forms/form_document.fd:size: FL_LARGE_SIZE ../xforms/forms/form_graphics.fd:size: FL_MEDIUM_SIZE Perhaps you'd investigate if there's a reason why these are different also? We turn these .fd files into .c and .h files using xforms' fdesign program and thereafter run the generated files through sed to clean them up and suit out purposes, spitting out .C and .h files. In this case, FL_XYZ_SIZE are hard-coded in forms.h, so you'll have to change these entries in the .[ch] files into something we can vary. You'll find that after they're run through the sed scripts, the autogenerated structs all derive from FD_base, defined in fdesign_base.[Ch]. Why not add something like extern int xforms_normal_font_size; extern int xforms_large_font_size; to the .h file and int xforms_normal_font = 12; int xforms_large_font = 18; to the .C file. All that's left to do is to modify the sed scripts to do the dirty work. Adding s/FL_NORMAL_SIZE/xforms_normal_font/ s/FL_LARGE_SIZE/xforms_large_font/ to fdfixc.sed should do the trick. HTH, A