imacarthur wrote:

> 
> On 17 Jan 2009, at 12:42, Alvin wrote:
> 
>> Alvin wrote: Right now I am experimenting with
>>> different font sizes like 11px and 12px.
>>>
>> In case anyone is interested, here's a patch that changes the
>> default label
>> size from 14 to 12 (patch created using SVN diff of r6636).
> 
> 
> Also, note that (assuming I remember this correctly) although it is
> declared in ALL_UPPER_CASE and therefore looks like a macro
> definition or something, FL_NORMAL_SIZE is actually a variable and is
> in global scope.
> 
> So, in your program, if you say:
> 
>      FL_NORMAL_SIZE = 44;
> 
> somewhere in your main() startup code before you create any widgets,
> then IIRC you get widgets with Very Big Labels. The reverse approach
> to get smaller labels can also work, of course.
> 
> So you don't really need to patch Fl_Widget.cxx, as you can apply
> this change dynamically at runtime.
> 

Even better! Thanks! I just did a 'grep 14' in src/ and made the change. I
guess I should have checked. Another thing to note is that the messages
boxes (fl_ask(), fl_mesage(), etc.) use a separate
variable 'fl_message_size' declared at fl_ask.cxx:57. AFAICT, this is also
global but would need to be set along with FL_NORMAL_SIZE.

The only benefit of patching the FLTK source is that fluid would use the
desired font size (12 in my case) as well.

-- 
Alvin
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to