[Bf-committers] Mat buttons "glitch"

Desoto bf-committers@blender.org
Sun, 26 Oct 2003 18:35:32 -0500


This is a multi-part message in MIME format.
--------------000509060005060007020806
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

There was a "glitch" with the matbuttons where the copy and paste 
material buttons were positioned relative to the std_libbuttons on their 
immediate left.  Basically they were a bit too far to the right on the 
panel, and when a material was no longer a single user material, it 
pushed the copy and paste buttons a pixel or two to the right, which 
then redrew all of the other buttons a pixel to the left.  Anyhow I 
positioned the buttons absolutely (hard coded the positions) and I think 
the overall effect is much better now.  Thanks :D


--------------000509060005060007020806
Content-Type: text/plain;
 name="desoto_mat_buts.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="desoto_mat_buts.txt"

Index: source/blender/src/buttons_shading.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/buttons_shading.c,v
retrieving revision 1.19
diff -u -r1.19 buttons_shading.c
--- source/blender/src/buttons_shading.c	23 Oct 2003 16:52:53 -0000	1.19
+++ source/blender/src/buttons_shading.c	26 Oct 2003 23:30:41 -0000
@@ -2221,10 +2221,10 @@
 	uiBlockSetCol(block, TH_BUT_SETTING2);
 	xco= std_libbuttons(block, 8, 200, 0, NULL, B_MATBROWSE, id, idfrom, &(G.buts->menunr), B_MATALONE, B_MATLOCAL, B_MATDELETE, B_AUTOMATNAME, B_KEEPDATA);
 
-	uiDefIconBut(block, BUT, B_MATCOPY, ICON_COPYUP,	xco+=XIC,198,XIC,YIC, 0, 0, 0, 0, 0, "Copies Material to the buffer");
+	uiDefIconBut(block, BUT, B_MATCOPY, ICON_COPYUP,	263,200,20,20, 0, 0, 0, 0, 0, "Copies Material to the buffer");
 	uiSetButLock(id && id->lib, "Can't edit library data");
-	uiDefIconBut(block, BUT, B_MATPASTE, ICON_PASTEUP,	xco+=XIC,198,XIC,YIC, 0, 0, 0, 0, 0, "Pastes Material from the buffer");
-	
+	uiDefIconBut(block, BUT, B_MATPASTE, ICON_PASTEUP,	284,200,20,20, 0, 0, 0, 0, 0, "Pastes Material from the buffer");
+ 	
 	if(ob->actcol==0) ob->actcol= 1;	/* because of TOG|BIT button */
 	
 	/* indicate which one is linking a material */

--------------000509060005060007020806--