scale down histogram button movement by 10, was very sensitive

This commit is contained in:
Campbell Barton
2012-07-29 01:41:46 +00:00
parent 4fc078001d
commit 0cfd402a7f

View 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);