The layouting model used by gDesklets is based on nesting boxes. While this approach is highly flexible, yet easy to understand, there can be cases where the result might not look as expected. This section tries to explain some common mistakes and show why the result does look as it looks.
If you don't explicity specify a size for a container element, it will just take up as much space as its child elements need. An empty container will thus collapse to the size of a single point.
A common mistake is to put only elements with percentual geometry values into a container. A child element with any percentual geometry value does not contribute to the container's size because its size or position itself is dependant on the container's size.
With older versions of gDesklets the results of such a situation were undefined. With version 0.35, gDesklets switched to a more accurate geometry engine, and the container will collapse correctly.
Elements with their size given in percentages depend on the size of their parent container. A common mistake is to have a child's size depend on the size of a container which has no defined size, for example:
<display width="100" height="100"> <frame> <group width="100%" height="100%" bg-color="white"/> </frame> </display>
As you can seem the group element has it's size depend on the size of the frame container. This container, however, has no defined size. In that case it will collapse to fit its child elements. However, since the child element itself depends on the size of the container, the frame will collapse to a single point (see above).
To make the group within the frame occupy the whole window area, the frame also needs to be stretched to the window size:
<display width="100" height="100"> <frame width="100%" height="100%"> <group width="100%" height="100%" bg-color="white"/> </frame> </display>
Elements placed relatively to each other have to be in the same parent container. If this is not the case, it depends on the version of gDesklets whether this will raise an error or be silently ignored altogether.