[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28276] trunk/blender/source/blender/ editors/space_file/file_draw.c: Fix [#22056] Minor UI problem in File Browser

Matt Ebb matt at mke3.net
Mon Apr 19 06:39:08 CEST 2010


Revision: 28276
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28276
Author:   broken
Date:     2010-04-19 06:39:01 +0200 (Mon, 19 Apr 2010)

Log Message:
-----------
Fix [#22056] Minor UI problem in File Browser

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_file/file_draw.c

Modified: trunk/blender/source/blender/editors/space_file/file_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/file_draw.c	2010-04-19 01:50:30 UTC (rev 28275)
+++ trunk/blender/source/blender/editors/space_file/file_draw.c	2010-04-19 04:39:01 UTC (rev 28276)
@@ -133,6 +133,7 @@
 	int loadbutton;
 	int fnumbuttons;
 	int min_x       = 10;
+	int chan_offs	= 0;
 	int available_w = max_x - min_x;
 	int line1_w     = available_w;
 	int line2_w     = available_w;
@@ -151,8 +152,9 @@
 	/* exception to make space for collapsed region icon */
 	for (artmp=CTX_wm_area(C)->regionbase.first; artmp; artmp=artmp->next) {
 		if (artmp->regiontype == RGN_TYPE_CHANNELS && artmp->flag & RGN_FLAG_HIDDEN) {
-			min_x += 16;
-			available_w -= 16;
+			chan_offs = 16;
+			min_x += chan_offs;
+			available_w -= chan_offs;
 		}
 	}
 	
@@ -182,12 +184,12 @@
 	/* Text input fields for directory and file. */
 	if (available_w > 0) {
 		but = uiDefBut(block, TEX, B_FS_DIRNAME, "",
-				 min_x, line1_y, line1_w, btn_h, 
+				 min_x, line1_y, line1_w-chan_offs, btn_h, 
 				 params->dir, 0.0, (float)FILE_MAX-1, 0, 0, 
 				 "File path.");
 		uiButSetCompleteFunc(but, autocomplete_directory, NULL);
 		uiDefBut(block, TEX, B_FS_FILENAME, "",
-				 min_x, line2_y, line2_w, btn_h,
+				 min_x, line2_y, line2_w-chan_offs, btn_h,
 				 params->file, 0.0, (float)FILE_MAXFILE-1, 0, 0, 
 				 "File name.");
 	}
@@ -196,13 +198,13 @@
 	if (fnumbuttons) {
 		uiBlockBeginAlign(block);
 		but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMOUT,
-				min_x + line2_w + separator, line2_y, 
+				min_x + line2_w + separator - chan_offs, line2_y, 
 				btn_fn_w, btn_h, 
 				"Decrement the filename number");    
 		RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", -1); 
 	
 		but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMIN, 
-				min_x + line2_w + separator + btn_fn_w, line2_y, 
+				min_x + line2_w + separator + btn_fn_w - chan_offs, line2_y, 
 				btn_fn_w, btn_h, 
 				"Increment the filename number");    
 		RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", 1); 





More information about the Bf-blender-cvs mailing list