Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/drawnode.c
| Show First 20 Lines • Show All 264 Lines • ▼ Show 20 Lines | if (node->flag & NODE_HIDDEN) { | ||||
| /* right part of node */ | /* right part of node */ | ||||
| totr.xmin = node->totr.xmax - 20.0f; | totr.xmin = node->totr.xmax - 20.0f; | ||||
| if (BLI_rctf_isect_pt(&totr, x, y)) | if (BLI_rctf_isect_pt(&totr, x, y)) | ||||
| return NODE_RESIZE_RIGHT; | return NODE_RESIZE_RIGHT; | ||||
| else | else | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| else { | else { | ||||
| const float size = 10.0f; | const float size = NODE_RESIZE_MARGIN; | ||||
brecht: This should be multiplied with `UI_DPI_FAC`. It was wrong already, but 3px is quite small on a… | |||||
| rctf totr = node->totr; | rctf totr = node->totr; | ||||
| int dir = 0; | int dir = 0; | ||||
| if (x >= totr.xmax - size && x < totr.xmax && y >= totr.ymin && y < totr.ymax) | if (x >= totr.xmax - size && x < totr.xmax && y >= totr.ymin && y < totr.ymax) | ||||
| dir |= NODE_RESIZE_RIGHT; | dir |= NODE_RESIZE_RIGHT; | ||||
| if (x >= totr.xmin && x < totr.xmin + size && y >= totr.ymin && y < totr.ymax) | if (x >= totr.xmin && x < totr.xmin + size && y >= totr.ymin && y < totr.ymax) | ||||
| dir |= NODE_RESIZE_LEFT; | dir |= NODE_RESIZE_LEFT; | ||||
| return dir; | return dir; | ||||
| ▲ Show 20 Lines • Show All 3,442 Lines • Show Last 20 Lines | |||||
This should be multiplied with UI_DPI_FAC. It was wrong already, but 3px is quite small on a retina screen.