Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/screen_ops.c
| Show First 20 Lines • Show All 881 Lines • ▼ Show 20 Lines | if (BLI_rcti_isect_pt_v(&az->rect, xy) && | ||||
| redraw = true; | redraw = true; | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| const int local_xy[2] = {xy[0] - region->winrct.xmin, xy[1] - region->winrct.ymin}; | const int local_xy[2] = {xy[0] - region->winrct.xmin, xy[1] - region->winrct.ymin}; | ||||
| float dist_fac = 0.0f, alpha = 0.0f; | float dist_fac = 0.0f, alpha = 0.0f; | ||||
| if (az->direction == AZ_SCROLL_HOR) { | if (az->direction == AZ_SCROLL_HOR) { | ||||
| dist_fac = BLI_rcti_length_y(&v2d->hor, local_xy[1]) / AZONEFADEIN; | float hide_width = (az->y2 - az->y1) / 2.0f; | ||||
| dist_fac = BLI_rcti_length_y(&v2d->hor, local_xy[1]) / hide_width; | |||||
| CLAMP(dist_fac, 0.0f, 1.0f); | CLAMP(dist_fac, 0.0f, 1.0f); | ||||
| alpha = 1.0f - dist_fac; | alpha = 1.0f - dist_fac; | ||||
| v2d->alpha_hor = alpha * 255; | v2d->alpha_hor = alpha * 255; | ||||
| } | } | ||||
| else if (az->direction == AZ_SCROLL_VERT) { | else if (az->direction == AZ_SCROLL_VERT) { | ||||
| dist_fac = BLI_rcti_length_x(&v2d->vert, local_xy[0]) / AZONEFADEIN; | float hide_width = (az->x2 - az->x1) / 2.0f; | ||||
| dist_fac = BLI_rcti_length_x(&v2d->vert, local_xy[0]) / hide_width; | |||||
| CLAMP(dist_fac, 0.0f, 1.0f); | CLAMP(dist_fac, 0.0f, 1.0f); | ||||
| alpha = 1.0f - dist_fac; | alpha = 1.0f - dist_fac; | ||||
| v2d->alpha_vert = alpha * 255; | v2d->alpha_vert = alpha * 255; | ||||
| } | } | ||||
| az->alpha = alpha; | az->alpha = alpha; | ||||
| redraw = true; | redraw = true; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 4,870 Lines • Show Last 20 Lines | |||||