Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_widgets.cc
| Show First 20 Lines • Show All 3,146 Lines • ▼ Show 20 Lines | switch (hsv_but->gradient_type) { | ||||
| case UI_GRAD_L_ALT: | case UI_GRAD_L_ALT: | ||||
| x = 0.5f; | x = 0.5f; | ||||
| /* exception only for value strip - use the range set in but->min/max */ | /* exception only for value strip - use the range set in but->min/max */ | ||||
| y = hsv[2]; | y = hsv[2]; | ||||
| break; | break; | ||||
| case UI_GRAD_V_ALT: | case UI_GRAD_V_ALT: | ||||
| x = 0.5f; | x = 0.5f; | ||||
| /* exception only for value strip - use the range set in but->min/max */ | /* exception only for value strip - use the range set in but->min/max */ | ||||
| y = (hsv[2] - hsv_but->but.softmin) / (hsv_but->but.softmax - hsv_but->but.softmin); | y = (hsv[2] - hsv_but->softmin) / (hsv_but->softmax - hsv_but->softmin); | ||||
| break; | break; | ||||
| } | } | ||||
| /* cursor */ | /* cursor */ | ||||
| *r_xp = rect->xmin + x * BLI_rcti_size_x(rect); | *r_xp = rect->xmin + x * BLI_rcti_size_x(rect); | ||||
| *r_yp = rect->ymin + y * BLI_rcti_size_y(rect); | *r_yp = rect->ymin + y * BLI_rcti_size_y(rect); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,357 Lines • Show Last 20 Lines | |||||