Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_file/file_draw.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| } | } | ||||
| UI_draw_roundbox_corner_set(UI_CNR_NONE); | UI_draw_roundbox_corner_set(UI_CNR_NONE); | ||||
| /* don't drag parent or refresh items */ | /* don't drag parent or refresh items */ | ||||
| do_drag = !FILENAME_IS_CURRPAR(file->relpath); | do_drag = !FILENAME_IS_CURRPAR(file->relpath); | ||||
| const bool is_hidden = (file->attributes & FILE_ATTR_HIDDEN); | const bool is_hidden = (file->attributes & FILE_ATTR_HIDDEN); | ||||
| const bool is_link = (file->attributes & FILE_ATTR_ANY_LINK); | const bool is_link = (file->attributes & FILE_ATTR_ANY_LINK); | ||||
| const int icon = filelist_geticon(files, i, false); | |||||
| if (FILE_IMGDISPLAY == params->display) { | if (FILE_IMGDISPLAY == params->display) { | ||||
| const int icon = filelist_geticon(files, i, false); | |||||
| is_icon = 0; | is_icon = 0; | ||||
| imb = filelist_getimage(files, i); | imb = filelist_getimage(files, i); | ||||
| if (!imb) { | if (!imb) { | ||||
| imb = filelist_geticon_image(files, i); | imb = filelist_geticon_image(files, i); | ||||
| is_icon = 1; | is_icon = 1; | ||||
| } | } | ||||
| file_draw_preview(sfile, | file_draw_preview(sfile, | ||||
| ▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | |||||
| const int txpos = (params->display == FILE_IMGDISPLAY) ? tile_draw_rect.xmin : | const int txpos = (params->display == FILE_IMGDISPLAY) ? tile_draw_rect.xmin : | ||||
| tile_draw_rect.xmin + 1 + icon_ofs; | tile_draw_rect.xmin + 1 + icon_ofs; | ||||
| const int typos = (params->display == FILE_IMGDISPLAY) ? | const int typos = (params->display == FILE_IMGDISPLAY) ? | ||||
| tile_draw_rect.ymin + layout->tile_border_y + layout->textheight : | tile_draw_rect.ymin + layout->tile_border_y + layout->textheight : | ||||
| tile_draw_rect.ymax - layout->tile_border_y; | tile_draw_rect.ymax - layout->tile_border_y; | ||||
| const int twidth = (params->display == FILE_IMGDISPLAY) ? | const int twidth = (params->display == FILE_IMGDISPLAY) ? | ||||
| textwidth : | textwidth : | ||||
| textwidth - 1 - icon_ofs - padx - layout->tile_border_x; | textwidth - 1 - icon_ofs - padx - layout->tile_border_x; | ||||
| file_draw_string(txpos, typos, file->name, (float)twidth, textheight, align, text_col); | if (icon == ICON_FILE_FONT && params->display != FILE_IMGDISPLAY) { | ||||
| BLF_batch_draw_end(); | |||||
| if (!BLF_draw_font_string( | |||||
| path, file->name, txpos, typos, (float)twidth, textheight, text_col)) { | |||||
| file_draw_string(txpos, typos, file->name, (float)twidth, textheight, align, text_col); | |||||
| } | |||||
| BLF_batch_draw_begin(); | |||||
| } | |||||
| else { | |||||
| file_draw_string(txpos, typos, file->name, (float)twidth, textheight, align, text_col); | |||||
| } | |||||
| } | } | ||||
| if (params->display != FILE_IMGDISPLAY) { | if (params->display != FILE_IMGDISPLAY) { | ||||
| draw_details_columns(params, layout, file, &tile_draw_rect, text_col); | draw_details_columns(params, layout, file, &tile_draw_rect, text_col); | ||||
| } | } | ||||
| } | } | ||||
| BLF_batch_draw_end(); | BLF_batch_draw_end(); | ||||
| ▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines | |||||