bugfix [#24432] HS+V color picker

This commit is contained in:
2010-10-28 12:01:02 +00:00
parent e205a9a142
commit 022e72e148
2 changed files with 4 additions and 4 deletions

View File

@@ -3006,13 +3006,13 @@ static int ui_numedit_but_HSVCUBE(uiBut *but, uiHandleButtonData *data, int mx,
hsv[0]= x;
hsv[1]= y;
break;
case UI_GRAD_SV + 3:
case UI_GRAD_H:
hsv[0]= x;
break;
case UI_GRAD_HV + 3:
case UI_GRAD_S:
hsv[1]= x;
break;
case UI_GRAD_HS + 3:
case UI_GRAD_V:
hsv[2]= x;
break;
case UI_GRAD_V_ALT:

View File

@@ -1729,7 +1729,7 @@ void ui_draw_but_HSVCIRCLE(uiBut *but, uiWidgetColors *wcol, rcti *rect)
void ui_draw_gradient(rcti *rect, float *hsv, int type, float alpha)
{
int a;
float h= hsv[0], s= hsv[1], v= hsv[0];
float h= hsv[0], s= hsv[1], v= hsv[2];
float dx, dy, sx1, sx2, sy;
float col0[4][3]; // left half, rect bottom to top
float col1[4][3]; // right half, rect bottom to top