[Bf-committers] Mat buttons "glitch"

Ton Roosendaal bf-committers@blender.org
Mon, 27 Oct 2003 14:32:42 +0100


Hi,

Thanks, is committed!

-Ton-

On Monday, Oct 27, 2003, at 00:35 Europe/Amsterdam, Desoto wrote:

> 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
>
> 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 */
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton@blender.org  
http://www.blender.org