Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_file/file_draw.c
| Show First 20 Lines • Show All 470 Lines • ▼ Show 20 Lines | if (rgb_to_grayscale(bgcolor) > 0.5f) { | ||||
| border_color[1] = 0.0f; | border_color[1] = 0.0f; | ||||
| border_color[2] = 0.0f; | border_color[2] = 0.0f; | ||||
| } | } | ||||
| immUniformColor4fv(border_color); | immUniformColor4fv(border_color); | ||||
| imm_draw_box_wire_2d(pos, (float)xco, (float)yco, (float)(xco + ex), (float)(yco + ey)); | imm_draw_box_wire_2d(pos, (float)xco, (float)yco, (float)(xco + ex), (float)(yco + ey)); | ||||
| immUnbindProgram(); | immUnbindProgram(); | ||||
| } | } | ||||
| but = uiDefBut(block, UI_BTYPE_LABEL, 0, "", xco, yco, ex, ey, NULL, 0.0, 0.0, 0, 0, NULL); | /* Invisible button for dragging. */ | ||||
| rcti drag_rect = *tile_draw_rect; | |||||
| /* A bit smaller than the full tile, to increase the gap between items that users can drag from | |||||
| * for box select. */ | |||||
| BLI_rcti_pad(&drag_rect, -layout->tile_border_x, -layout->tile_border_y); | |||||
| but = uiDefBut(block, | |||||
| UI_BTYPE_LABEL, | |||||
| 0, | |||||
| "", | |||||
| drag_rect.xmin, | |||||
| drag_rect.ymin, | |||||
| BLI_rcti_size_x(&drag_rect), | |||||
| BLI_rcti_size_y(&drag_rect), | |||||
| NULL, | |||||
| 0.0, | |||||
| 0.0, | |||||
| 0, | |||||
| 0, | |||||
| NULL); | |||||
| /* Drag-region. */ | /* Drag-region. */ | ||||
| if (drag) { | if (drag) { | ||||
| ID *id; | ID *id; | ||||
| if ((id = filelist_file_get_id(file))) { | if ((id = filelist_file_get_id(file))) { | ||||
| UI_but_drag_set_id(but, id); | UI_but_drag_set_id(but, id); | ||||
| UI_but_drag_attach_image(but, imb, scale); | UI_but_drag_attach_image(but, imb, scale); | ||||
| ▲ Show 20 Lines • Show All 656 Lines • Show Last 20 Lines | |||||