How to make use a background image? The main how-to shows a new tag to declaratively set the background, <g:background/>, but this only seemed to work with absolute positioning – again not an official line just what I observed. The problem seems obvious, if you use an element then you’re getting involved in the document flow. I don’t understand this since the element is described as a way of setting the gadget.background.image without using code so I though it would be removed before rendering. So not very happy with this I had a look around the web. One example I spotted just used the basic CSS background-image for the body. It worked a treat, so why you need the alternative version I don’t know – perhaps that will become clear later, other gadget technologies perhaps? The next bizarre issue was the background image itself, again could be Paint.Net I’m not sure. When I replaced the background image with a new one the gadget rendered some odd mix of the old and new. When I removed the image from the folder the gadget worked fine, put the image back and the odd mix appeared. Created a brand new image (i.e. new name) and that worked fine. Chopped the corner off for a nice rounded edge and that worked…well if you count an odd lightning fork like line going through the gadget as working! So just be careful when editing the background image, if you get odd results just bin the file and create a new one.
More Vista sideshow questions than answers?
After my initial play with gadgets I thought I’d see how to make the background transparent. Boy do I regret looking at that. The basic mechanism is based around the background image, set this to transparent and desktop will show through. Sounds simple. I downloaded Paint.NET and created a PNG with 50% opacity. The gadget text took on the background of the image but no opacity. Now I’m not sure if this is a problem with Paint or the gadget. However, after playing around with moving the image’s canvas I did eventually get parts of the gadget to be transparent, although it has created more questions than answers…