How do I setup the toolbar buttons so that the background color of the images becomes transparent (same color as the toolbar).
It is not sufficient to just do this in an image editor since the toolbar color is different in different OSs(Win2000 is different color than WinXP).
What is needed is a way to make the background of the images transparent. A mask color is the way I am used to doing this but I don't see any way to define a mask color in the toolbar editor.
TIA
Hi Art,
You're probably right. If you look at the FireFly generate source you will see that FireFly creates image lists to handle the 3 different image states (normal, disabled, hot). The image is added using the mask as follows:
ImageList_AddMasked(FF_ImageListNormal, FF_tempLong, GetSysColor(%COLOR_BTNFACE))
I think that you're right in assumming that if the background color in the bitmap is not the same as the one defined in the system as %COLOR_BTNFACE then the transparancy will not work correctly.
The most versatile solution would be to allow the mask color to be selected by the user, or use the most top left pixel in the bitmap as the transparant color.
Anyone else have any thoughts on this?
<The most versatile solution would be to allow the mask color to be selected by the user>
This is the way I have seen this handled in other places. If the toolbar editor allowed the developer to select the mask color, this would resolve the problem. The mask color that I have seen most often used as the default is magenta.
Do you think that this is something that you can implement in the toolbar editor?
TIA
Haven't messed with toolbars much, but can't you make the images icon/ico files that will have transparent colors that will show the background through??? The only issue I've had with image lists is the XP themes not painting through the transparent sections...it only uses the image list background.
As a follow up to this post. I converted the BMPs I was using for the toolbar into ICOs with transparent backgrounds and was able to achieve the results I wanted. So, this is definitely acceptable as a workaround while we await the addition of user-defined mask colors for toolbar bitmap images.
Loading a bitmap with LR_LOADTRANSPARENT and/or LR_LOADMAP3DCOLORS would be the only way to get it transparent. ICO files are the way to go...they give you more options and are smaller than BMP.