Branch: Tag:

2000-02-02

2000-02-02 00:21:54 by Per Hedbor <ph@opera.com>

Allow font configuration

Rev: server/modules/graphics/gbutton.pike:1.11
Rev: server/modules/tags/tablist.pike:1.31

25:   // must also be aligned left or right.       - constant cvs_version = "$Id: gbutton.pike,v 1.10 2000/01/19 19:04:44 noring Exp $"; + constant cvs_version = "$Id: gbutton.pike,v 1.11 2000/02/02 00:21:49 per Exp $";   constant thread_safe = 1;      #include <module.h>
34:         roxen.ImageCache button_cache; - Image.Font button_font; +    Image.Image button_border;   Image.Image button_mask;   
98:   void start()   {    button_cache = roxen.ImageCache("gbutton", draw_button); -  button_font = resolve_font( "haru 32" ); +    }      
119:    Image.Image text_img, b, tmp, button;    int req_width, b_width, b_height, t_width, i_width, icn_x, txt_x;    mapping icon; +  object button_font = resolve_font( args->font );       // Load images    if (!button_border) {
282:    (< "dim", "disabled" >)[lower_case(args->state || "")],    "icn" : args->icon_src && fix_relative(args->icon_src, id), // Icon URL    "icd" : args->icon_data, // Inline icon data -  "ica" : args->align_icon || "left" // Icon alignment +  "ica" : args->align_icon || "left", // Icon alignment +  "font": args->font,    ]);       if(args->bordercolor)