diff options
Diffstat (limited to 'source/blender/editors/space_file/file_draw.c')
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 75763b53d7f..fcfe745546e 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -86,7 +86,7 @@ static char *file_draw_tooltip_func(bContext *UNUSED(C), void *argN, const char return BLI_strdup(dyn_tooltip); } -/* Note: This function uses pixelspace (0, 0, winx, winy), not view2d. +/* Note: This function uses pixelspace (0, 0, winx, winy), not view2d. * The controls are laid out as follows: * * ------------------------------------------- @@ -121,14 +121,14 @@ void file_draw_buttons(const bContext *C, ARegion *ar) int available_w = max_x - min_x; int line1_w = available_w; int line2_w = available_w; - + uiBut *but; uiBlock *block; SpaceFile *sfile = CTX_wm_space_file(C); FileSelectParams *params = ED_fileselect_get_params(sfile); ARegion *artmp; const bool is_browse_only = (sfile->op == NULL); - + /* Initialize UI block. */ BLI_snprintf(uiblockstr, sizeof(uiblockstr), "win %p", (void *)ar); block = UI_block_begin(C, ar, uiblockstr, UI_EMBOSS); @@ -212,11 +212,11 @@ void file_draw_buttons(const bContext *C, ARegion *ar) UI_but_flag_enable(but, UI_BUT_REDALERT); } } - + /* clear func */ UI_block_func_set(block, NULL, NULL, NULL); } - + /* Filename number increment / decrement buttons. */ if (fnumbuttons && (params->flag & FILE_DIRSEL_ONLY) == 0) { UI_block_align_begin(block); @@ -233,7 +233,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar) RNA_int_set(UI_but_operator_ptr_get(but), "increment", 1); UI_block_align_end(block); } - + /* Execute / cancel buttons. */ if (loadbutton) { const struct FileDirEntry *file = sfile->files ? filelist_file(sfile->files, params->active_file) : NULL; @@ -254,7 +254,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar) uiDefButO(block, UI_BTYPE_BUT, "FILE_OT_cancel", WM_OP_EXEC_REGION_WIN, IFACE_("Cancel"), max_x - loadbutton, line2_y, loadbutton, btn_h, ""); } - + UI_block_end(C, block); UI_block_draw(C, block); } @@ -274,10 +274,10 @@ static void file_draw_icon(uiBlock *block, const char *path, int sx, int sy, int uiBut *but; int x, y; // float alpha = 1.0f; - + x = sx; y = sy - height; - + /*if (icon == ICON_FILE_BLANK) alpha = 0.375f;*/ but = uiDefIconBut(block, UI_BTYPE_LABEL, 0, icon, x, y, width, height, NULL, 0.0f, 0.0f, 0.0f, 0.0f, NULL); @@ -323,7 +323,7 @@ void file_calc_previews(const bContext *C, ARegion *ar) { SpaceFile *sfile = CTX_wm_space_file(C); View2D *v2d = &ar->v2d; - + ED_fileselect_init_layout(sfile, ar); UI_view2d_totRect_set(v2d, sfile->layout->width, sfile->layout->height); } @@ -556,11 +556,11 @@ void file_draw_list(const bContext *C, ARegion *ar) const float thumb_icon_aspect = sqrtf(64.0f / (float)(params->thumbnail_size)); numfiles = filelist_files_ensure(files); - + if (params->display != FILE_IMGDISPLAY) { draw_background(layout, v2d); - + draw_dividers(layout, v2d); } |