[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54516] trunk/blender/source/blender/ editors: style cleanup

Campbell Barton ideasman42 at gmail.com
Wed Feb 13 06:10:38 CET 2013


Revision: 54516
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54516
Author:   campbellbarton
Date:     2013-02-13 05:10:38 +0000 (Wed, 13 Feb 2013)
Log Message:
-----------
style cleanup

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_file/file_draw.c
    trunk/blender/source/blender/editors/space_file/filesel.c
    trunk/blender/source/blender/editors/space_image/image_buttons.c
    trunk/blender/source/blender/editors/space_outliner/outliner_draw.c

Modified: trunk/blender/source/blender/editors/space_file/file_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/file_draw.c	2013-02-13 05:07:46 UTC (rev 54515)
+++ trunk/blender/source/blender/editors/space_file/file_draw.c	2013-02-13 05:10:38 UTC (rev 54516)
@@ -335,7 +335,9 @@
 		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 @@
 	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 @@
 
 	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 @@
 		}
 		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 */

Modified: trunk/blender/source/blender/editors/space_file/filesel.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/filesel.c	2013-02-13 05:07:46 UTC (rev 54515)
+++ trunk/blender/source/blender/editors/space_file/filesel.c	2013-02-13 05:10:38 UTC (rev 54516)
@@ -500,12 +500,12 @@
 	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 @@
 		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;

Modified: trunk/blender/source/blender/editors/space_image/image_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/image_buttons.c	2013-02-13 05:07:46 UTC (rev 54515)
+++ trunk/blender/source/blender/editors/space_image/image_buttons.c	2013-02-13 05:10:38 UTC (rev 54516)
@@ -498,17 +498,17 @@
 	}
 
 	/* 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);

Modified: trunk/blender/source/blender/editors/space_outliner/outliner_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_outliner/outliner_draw.c	2013-02-13 05:07:46 UTC (rev 54515)
+++ trunk/blender/source/blender/editors/space_outliner/outliner_draw.c	2013-02-13 05:10:38 UTC (rev 54516)
@@ -1677,7 +1677,7 @@
 		 *				 (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 */




More information about the Bf-blender-cvs mailing list