From 019c0e56579fe7f94982434d8efcd7b00d8df0aa Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Fri, 28 Dec 2007 03:43:06 +0000 Subject: ... and again trying to check in 0.41-0 test 10 svn path=/trunk/; revision=9108 --- pd/src/g_numbox.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'pd/src/g_numbox.c') diff --git a/pd/src/g_numbox.c b/pd/src/g_numbox.c index 04c9c1bb..db25e918 100644 --- a/pd/src/g_numbox.c +++ b/pd/src/g_numbox.c @@ -195,15 +195,17 @@ static void my_numbox_draw_new(t_my_numbox *x, t_glist *glist) xpos, ypos + x->x_gui.x_h, x->x_gui.x_fcol, x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {%s %d bold} -fill #%6.6x -tags %lxLABEL\n", + -font {{%s} -%d %s} -fill #%6.6x -tags %lxLABEL\n", canvas, xpos+x->x_gui.x_ldx, ypos+x->x_gui.x_ldy, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:"", - x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_lcol, x); + x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, + x->x_gui.x_lcol, x); my_numbox_ftoa(x); sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor w \ - -font {%s %d bold} -fill #%6.6x -tags %lxNUMBER\n", + -font {{%s} -%d %s} -fill #%6.6x -tags %lxNUMBER\n", canvas, xpos+half+2, ypos+half+d, - x->x_buf, x->x_gui.x_font, x->x_gui.x_fontsize, x->x_gui.x_fcol, x); + x->x_buf, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, + x->x_gui.x_fcol, x); if(!x->x_gui.x_fsf.x_snd_able) sys_vgui(".x%lx.c create rectangle %d %d %d %d -tags %lxOUT%d\n", canvas, @@ -269,12 +271,12 @@ static void my_numbox_draw_config(t_my_numbox* x,t_glist* glist) { t_canvas *canvas=glist_getcanvas(glist); - sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {%s %d bold} -fill #%6.6x -text {%s} \n", - canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, + sys_vgui(".x%lx.c itemconfigure %lxLABEL -font {{%s} -%d %s} -fill #%6.6x -text {%s} \n", + canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_lcol, strcmp(x->x_gui.x_lab->s_name, "empty")?x->x_gui.x_lab->s_name:""); - sys_vgui(".x%lx.c itemconfigure %lxNUMBER -font {%s %d bold} -fill #%6.6x \n", - canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, + sys_vgui(".x%lx.c itemconfigure %lxNUMBER -font {{%s} -%d %s} -fill #%6.6x \n", + canvas, x, x->x_gui.x_font, x->x_gui.x_fontsize, sys_fontweight, x->x_gui.x_fsf.x_selected?IEM_GUI_COLOR_SELECTED:x->x_gui.x_fcol); sys_vgui(".x%lx.c itemconfigure %lxBASE1 -fill #%6.6x\n", canvas, x, x->x_gui.x_bcol); @@ -389,7 +391,7 @@ static void my_numbox_save(t_gobj *z, t_binbuf *b) binbuf_addv(b, "ssiisiiffiisssiiiiiiifi", gensym("#X"),gensym("obj"), (int)x->x_gui.x_obj.te_xpix, (int)x->x_gui.x_obj.te_ypix, gensym("nbx"), x->x_gui.x_w, x->x_gui.x_h, - (float)x->x_min, (float)x->x_max, + (t_float)x->x_min, (t_float)x->x_max, x->x_lin0_log1, iem_symargstoint(&x->x_gui.x_isa), srl[0], srl[1], srl[2], x->x_gui.x_ldx, x->x_gui.x_ldy, @@ -451,7 +453,7 @@ static void my_numbox_properties(t_gobj *z, t_glist *owner) sys_queuegui(x, x->x_gui.x_glist, my_numbox_draw_update); } - sprintf(buf, "pdtk_iemgui_dialog %%s NUMBERBOX \ + sprintf(buf, "pdtk_iemgui_dialog %%s |nbx| \ -------dimensions(digits)(pix):------- %d %d width: %d %d height: \ -----------output-range:----------- %g min: %g max: %d \ %d lin log %d %d log-height: %d \ @@ -806,7 +808,7 @@ static void *my_numbox_new(t_symbol *s, int argc, t_atom *argv) if(x->x_gui.x_fsf.x_font_style == 1) strcpy(x->x_gui.x_font, "helvetica"); else if(x->x_gui.x_fsf.x_font_style == 2) strcpy(x->x_gui.x_font, "times"); else { x->x_gui.x_fsf.x_font_style = 0; - strcpy(x->x_gui.x_font, "courier"); } + strcpy(x->x_gui.x_font, sys_font); } if (x->x_gui.x_fsf.x_rcv_able) pd_bind(&x->x_gui.x_obj.ob_pd, x->x_gui.x_rcv); x->x_gui.x_ldx = ldx; -- cgit v1.2.1