scale down histogram button movement by 10, was very sensitive
authorCampbell Barton <ideasman42@gmail.com>
Sun, 29 Jul 2012 01:41:46 +0000 (01:41 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 29 Jul 2012 01:41:46 +0000 (01:41 +0000)
source/blender/editors/interface/interface_handlers.c

index 314a36f..ce9e630 100644 (file)
@@ -3868,9 +3868,9 @@ static int ui_numedit_but_HISTOGRAM(uiBut *but, uiHandleButtonData *data, int mx
                hist->height = (but->y2 - but->y1) + (data->dragstarty - my);
        }
        else {
-               /* scale histogram values */
+               /* scale histogram values (dy / 10 for better control) */
                const float yfac = minf(powf(hist->ymax, 2.0f), 1.0f) * 0.5f;
-               hist->ymax += dy * yfac;
+               hist->ymax += (dy * 0.1f) * yfac;
        
                /* 0.1 allows us to see HDR colors up to 10 */
                CLAMP(hist->ymax, 0.1f, 100.f);