Skip to content
Snippets Groups Projects
Commit 987b40a4 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fix #242: VU base rectangle is drawn too wide and overlaps the scale when placed on a GOP canvas

parent 855a86ad
No related branches found
No related tags found
No related merge requests found
......@@ -137,8 +137,18 @@ static void vu_draw_new(t_vu *x, t_glist *glist)
int k1=x->x_led_size+1, k2=IEM_VU_STEPS+1, k3=k1/2;
int led_col, yyy, i, k4=y1-k3;
char cbuf[8];
/* vumeter is a special case because the base doesn't actually
cover the entire bbox returned by vu_getrect. Instead it is
the bbox minus the width of the scale. That means the call
below is going to draw a base rectangle that is too wide... */
iemgui_base_draw_new(&x->x_gui);
/* ...as a quick and dirty bugfix, we just make another call
and send the correct size */
gui_vmess("gui_vumeter_border_size", "xxii",
canvas, x, x->x_gui.x_w+2, x->x_gui.x_h+4);
for(i = 1; i <= IEM_VU_STEPS+1; i++)
{
yyy = k4 + k1 * (k2-i);
......@@ -186,6 +196,8 @@ static void vu_draw_move(t_vu *x, t_glist *glist)
int k1=x->x_led_size+1, k2=IEM_VU_STEPS+1, k3=k1/2;
int yyy, i, k4=y1-k3;
iemgui_base_draw_move(&x->x_gui);
gui_vmess("gui_vumeter_border_size", "xxii",
canvas, x, x->x_gui.x_w+2, x->x_gui.x_h+4);
for(i=1; i<=IEM_VU_STEPS; i++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment