From d27428b83f8b6ec494aa49a28c5519eb2d30c57f Mon Sep 17 00:00:00 2001 From: Ivica Ico Bukvic <ico@monsoon-hp.(none)> Date: Fri, 2 Mar 2012 12:12:28 -0500 Subject: [PATCH] fixed automatic knob repositioning also when using properties window --- src/g_hslider.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/g_hslider.c b/src/g_hslider.c index cf1c4339f..b6d9cf3f4 100644 --- a/src/g_hslider.c +++ b/src/g_hslider.c @@ -711,7 +711,11 @@ static void hslider_dialog(t_hslider *x, t_symbol *s, int argc, t_atom *argv) x->x_steady = 0; sr_flags = iemgui_dialog(&x->x_gui, srl, argc, argv); x->x_gui.x_h = iemgui_clip_size(h); + int old_width = x->x_gui.x_w; hslider_check_width(x, w); + if (x->x_gui.x_w != old_width) { + x->x_val = x->x_val * ((double)x->x_gui.x_w/(double)old_width); + } hslider_check_minmax(x, min, max); (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_CONFIG); (*x->x_gui.x_draw)(x, x->x_gui.x_glist, IEM_GUI_DRAW_MODE_IO + sr_flags); -- GitLab