diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 12 | ||||
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 20 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_buttons.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 2 |
4 files changed, 22 insertions, 20 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; diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 6a0f413b4fe..01364fcacf0 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -498,17 +498,17 @@ static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, RenderResult *rr, } /* decrease, increase arrows */ - but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0, 0, 0.85*UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Previous Layer")); + but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0, 0, 0.85f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Previous Layer")); uiButSetFunc(but, image_multi_declay_cb, rr, iuser); - but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0, 0, 0.90*UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Next Layer")); + but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0, 0, 0.90f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Next Layer")); uiButSetFunc(but, image_multi_inclay_cb, rr, iuser); uiblock_layer_pass_buttons(row, rr, iuser, 230 * dpi_fac, render_slot); /* decrease, increase arrows */ - but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0, 0, 0.85*UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Previous Pass")); + but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT, 0, 0, 0.85f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Previous Pass")); uiButSetFunc(but, image_multi_decpass_cb, rr, iuser); - but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0, 0, 0.90*UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Next Pass")); + but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT, 0, 0, 0.90f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Next Pass")); uiButSetFunc(but, image_multi_incpass_cb, rr, iuser); uiBlockEndAlign(block); diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index b64019b01be..cacbc6d6268 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -1677,7 +1677,7 @@ void draw_outliner(const bContext *C) * (OL_RNA_COL_X), whichever is wider... * - column 2 is fixed at OL_RNA_COL_SIZEX * - * (*) XXX max width for now is a fixed factor of UI_UNIT_X*(max_indention+100) + * (*) XXX max width for now is a fixed factor of (UI_UNIT_X * (max_indention + 100)) */ /* get actual width of column 1 */ |