diff options
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 20 |
2 files changed, 17 insertions, 15 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index ad76fbf9200..afe32ec0b85 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -335,7 +335,9 @@ static void file_draw_preview(uiBlock *block, struct direntry *file, int sx, int float scale; int ex, ey; - if ( (imb->x*UI_DPI_FAC > layout->prv_w) || (imb->y*UI_DPI_FAC > layout->prv_h) ) { + if ((imb->x * UI_DPI_FAC > layout->prv_w) || + (imb->y * UI_DPI_FAC > layout->prv_h)) + { if (imb->x > imb->y) { scaledx = (float)layout->prv_w; scaledy = ( (float)imb->y / (float)imb->x) * layout->prv_w; @@ -462,7 +464,7 @@ void file_draw_list(const bContext *C, ARegion *ar) int i; short is_icon; short align; - int column_space = 0.6f*UI_UNIT_X; + int column_space = 0.6f * UI_UNIT_X; numfiles = filelist_numfiles(files); @@ -493,7 +495,7 @@ void file_draw_list(const bContext *C, ARegion *ar) for (i = offset; (i < numfiles) && (i < offset + numfiles_layout); i++) { ED_fileselect_layout_tilepos(layout, i, &sx, &sy); - sx += (int)(v2d->tot.xmin + 0.1f*UI_UNIT_X); + sx += (int)(v2d->tot.xmin + 0.1f * UI_UNIT_X); sy = (int)(v2d->tot.ymax - sy); file = filelist_file(files, i); @@ -522,13 +524,13 @@ void file_draw_list(const bContext *C, ARegion *ar) } else { file_draw_icon(block, file->path, sx, sy - (UI_UNIT_Y / 6), get_file_icon(file), ICON_DEFAULT_WIDTH_SCALE, ICON_DEFAULT_HEIGHT_SCALE); - sx += ICON_DEFAULT_WIDTH_SCALE + 0.2f*UI_UNIT_X; + sx += ICON_DEFAULT_WIDTH_SCALE + 0.2f * UI_UNIT_X; } UI_ThemeColor4(TH_TEXT); if (file->selflag & EDITING_FILE) { - uiBut *but = uiDefBut(block, TEX, 1, "", sx, sy - layout->tile_h - 0.15*UI_UNIT_X, + uiBut *but = uiDefBut(block, TEX, 1, "", sx, sy - layout->tile_h - 0.15f * UI_UNIT_X, textwidth, textheight, sfile->params->renameedit, 1.0f, (float)sizeof(sfile->params->renameedit), 0, 0, ""); uiButSetRenameFunc(but, renamebutton_cb, file); uiButSetFlag(but, UI_BUT_NO_UTF8); /* allow non utf8 names */ diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index aed7fc45e95..3c6f6358171 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -500,12 +500,12 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *ar) layout->textheight = textheight; if (params->display == FILE_IMGDISPLAY) { - layout->prv_w = 4.8f*UI_UNIT_X; - layout->prv_h = 4.8f*UI_UNIT_Y; - layout->tile_border_x = 0.3f*UI_UNIT_X; - layout->tile_border_y = 0.3f*UI_UNIT_X; - layout->prv_border_x = 0.3f*UI_UNIT_X; - layout->prv_border_y = 0.3f*UI_UNIT_Y; + layout->prv_w = 4.8f * UI_UNIT_X; + layout->prv_h = 4.8f * UI_UNIT_Y; + layout->tile_border_x = 0.3f * UI_UNIT_X; + layout->tile_border_y = 0.3f * UI_UNIT_X; + layout->prv_border_x = 0.3f * UI_UNIT_X; + layout->prv_border_y = 0.3f * UI_UNIT_Y; layout->tile_w = layout->prv_w + 2 * layout->prv_border_x; layout->tile_h = layout->prv_h + 2 * layout->prv_border_y + textheight; layout->width = (int)(BLI_rctf_size_x(&v2d->cur) - 2 * layout->tile_border_x); @@ -520,13 +520,13 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, ARegion *ar) layout->flag = FILE_LAYOUT_VER; } else { - int column_space = 0.6f*UI_UNIT_X; - int column_icon_space = 0.2f*UI_UNIT_X; + int column_space = 0.6f * UI_UNIT_X; + int column_icon_space = 0.2f * UI_UNIT_X; layout->prv_w = 0; layout->prv_h = 0; - layout->tile_border_x = 0.4f*UI_UNIT_X; - layout->tile_border_y = 0.1f*UI_UNIT_Y; + layout->tile_border_x = 0.4f * UI_UNIT_X; + layout->tile_border_y = 0.1f * UI_UNIT_Y; layout->prv_border_x = 0; layout->prv_border_y = 0; layout->tile_h = textheight * 3 / 2; |