Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/view2d.c
| Context not available. | |||||
| scrollers->hor_min = scrollers->hor_max; | scrollers->hor_min = scrollers->hor_max; | ||||
| } | } | ||||
| /* prevent sliders from being too small, and disappearing */ | /* prevent sliders from being too small, and disappearing */ | ||||
| if ((scrollers->hor_max - scrollers->hor_min) < V2D_SCROLLER_HANDLE_SIZE) { | if ((scrollers->hor_max - scrollers->hor_min) < 50.0f) { | ||||
| scrollers->hor_max = scrollers->hor_min + V2D_SCROLLER_HANDLE_SIZE; | scrollers->hor_max = scrollers->hor_min + 50.0f; | ||||
| CLAMP(scrollers->hor_max, hor.xmin + 50.0f, hor.xmax); | |||||
| CLAMP(scrollers->hor_max, hor.xmin + V2D_SCROLLER_HANDLE_SIZE, hor.xmax); | CLAMP(scrollers->hor_min, hor.xmin, hor.xmax - 50.0f); | ||||
| CLAMP(scrollers->hor_min, hor.xmin, hor.xmax - V2D_SCROLLER_HANDLE_SIZE); | |||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||
| scrollers->vert_min = scrollers->vert_max; | scrollers->vert_min = scrollers->vert_max; | ||||
| } | } | ||||
| /* prevent sliders from being too small, and disappearing */ | /* prevent sliders from being too small, and disappearing */ | ||||
| if ((scrollers->vert_max - scrollers->vert_min) < V2D_SCROLLER_HANDLE_SIZE) { | if ((scrollers->vert_max - scrollers->vert_min) < 50.0f) { | ||||
| scrollers->vert_max = scrollers->vert_min + V2D_SCROLLER_HANDLE_SIZE; | scrollers->vert_max = scrollers->vert_min + 50.0f; | ||||
| CLAMP(scrollers->vert_max, vert.ymin + V2D_SCROLLER_HANDLE_SIZE, vert.ymax); | CLAMP(scrollers->vert_max, vert.ymin + 50.0f, vert.ymax); | ||||
| CLAMP(scrollers->vert_min, vert.ymin, vert.ymax - V2D_SCROLLER_HANDLE_SIZE); | CLAMP(scrollers->vert_min, vert.ymin, vert.ymax - 50.0f); | ||||
| } | } | ||||
| } | } | ||||
| Context not available. | |||||