From 44505b38df557a5711703613685a1dec9fc2c3d9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 4 Jun 2018 09:31:30 +0200 Subject: Cleanup: strip trailing space in editors --- source/blender/editors/space_file/file_draw.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'source/blender/editors/space_file/file_draw.c') diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index d604ce99019..befdf6751ee 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -82,7 +82,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: * * ------------------------------------------- @@ -117,14 +117,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); @@ -208,11 +208,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); @@ -229,7 +229,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; @@ -250,7 +250,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); } @@ -269,10 +269,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); @@ -317,7 +317,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); } @@ -458,7 +458,7 @@ static void draw_background(FileLayout *layout, View2D *v2d) sy = (int)v2d->cur.ymax - i * (layout->tile_h + 2 * layout->tile_border_y) - layout->tile_border_y; glRectf(v2d->cur.xmin, (float)sy, v2d->cur.xmax, (float)(sy + layout->tile_h + 2 * layout->tile_border_y)); - + } } @@ -522,11 +522,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); } -- cgit v1.2.3