Commit 5d6a6e09 authored by Mathieu L Bouchard's avatar Mathieu L Bouchard
Browse files

fix several display bugs

parent ed151c5b
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment