From 5d6a6e09ba4481fd6f8f73fd8b4c3f348ef395f5 Mon Sep 17 00:00:00 2001 From: Mathieu L Bouchard <matju@artengine.ca> Date: Fri, 15 Aug 2014 23:49:23 -0400 Subject: [PATCH] fix several display bugs --- pd/src/g_numbox.c | 2 +- pd/src/g_vumeter.c | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pd/src/g_numbox.c b/pd/src/g_numbox.c index 72fd5e20b..6d98b7df1 100644 --- a/pd/src/g_numbox.c +++ b/pd/src/g_numbox.c @@ -198,7 +198,7 @@ static void my_numbox_draw_move(t_my_numbox *x, t_glist *glist) static void my_numbox_draw_config(t_my_numbox* x,t_glist* glist) { t_canvas *canvas=glist_getcanvas(glist); - char fcol[8]; sprintf(fcol, "%6.6x", x->x_gui.x_fcol); + char fcol[8]; sprintf(fcol, "#%6.6x", x->x_gui.x_fcol); int issel = x->x_gui.x_selected == canvas && x->x_gui.x_glist == canvas; sys_vgui(".x%lx.c itemconfigure %lxNUMBER -font %s -fill %s\n", canvas, x, iemgui_font(&x->x_gui), issel ? selection_color : fcol); diff --git a/pd/src/g_vumeter.c b/pd/src/g_vumeter.c index 8789e455f..34bba5576 100644 --- a/pd/src/g_vumeter.c +++ b/pd/src/g_vumeter.c @@ -209,7 +209,7 @@ static void vu_draw_config(t_vu* x, t_glist* glist) { int i; t_canvas *canvas=glist_getcanvas(glist); - char lcol[8]; sprintf(lcol, "%6.6x", x->x_gui.x_lcol); + char lcol[8]; sprintf(lcol, "#%6.6x", x->x_gui.x_lcol); for(i = 1; i <= IEM_VU_STEPS+1; i++) { if (i <= IEM_VU_STEPS) @@ -488,18 +488,16 @@ static void vu_properties(t_gobj *z, t_glist *owner) static void vu_dialog(t_vu *x, t_symbol *s, int argc, t_atom *argv) { canvas_apply_setundo(x->x_gui.x_glist, (t_gobj *)x); - t_symbol *srl[3]; int w = atom_getintarg(0, argc, argv); int h = atom_getintarg(1, argc, argv); int scale = !!atom_getintarg(4, argc, argv); - srl[0] = s_empty; - int sr_flags = iemgui_dialog(&x->x_gui, srl, argc, argv); + int sr_flags = iemgui_dialog(&x->x_gui, argc, argv); x->x_gui.x_loadinit = 0; x->x_gui.x_w = iemgui_clip_size(w); vu_check_height(x, h); vu_scale(x, (t_float)scale); x->x_gui.x_draw(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_CONFIG); - iemgui_draw_io(&x->x_gui, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_IO + sr_flags); + iemgui_draw_io(&x->x_gui, x->x_gui.x_glist, sr_flags); iemgui_shouldvis(&x->x_gui, IEM_GUI_DRAW_MODE_MOVE); scalehandle_draw(&x->x_gui, x->x_gui.x_glist); scrollbar_update(x->x_gui.x_glist); @@ -617,7 +615,7 @@ static void *vu_new(t_symbol *s, int argc, t_atom *argv) x->x_rms = 0; x->x_fp = -101.0; x->x_fr = -101.0; - iemgui_verify_snd_ne_rcv(&x->x_gui); + iemgui_verify_snd_ne_rcv(&x->x_gui); // makes no sense, because snd is unused inlet_new(&x->x_gui.x_obj, &x->x_gui.x_obj.ob_pd, &s_float, gensym("ft1")); x->x_out_rms = outlet_new(&x->x_gui.x_obj, &s_float); x->x_out_peak = outlet_new(&x->x_gui.x_obj, &s_float); -- GitLab