The problem is a very simple one that I'm sure has a very simple solution. However, what we thought should work does not and we are unsure why.
The problem is with our frame windows. Besides the title bar, we have a decorative border on our windows (goes under the title bar and along the left, right, and bottom edge). This is just defined in the looknfeel, and the images are showing up fine. However, the client area is drawing itself overtop of the top decorative frame. It's easiest to show the problem rather than try to describe it; and it's most apparent when you see an opaque version and a transparent version.
Now, we've isolated the section of the looknfeel that is doing this; it was originally:
Code: Select all
<Dim type="TopEdge">
<WidgetDim widget="__auto_titlebar__" dimension="Height" />
</Dim>
(That was leftover from the WindowsLook, which we've been modifying for our skin.)
So we thought, 'Ok, we get it, we need it to account for both the height of the titlebar AND the height of our image.' We've been trying to do just that, and so far Mr. DimOperator tag is not cooperating. At first we were trying to use the WidgetDim code from above, and just slapped a DimOperator Add after that with the ImageDim inside of it, resulting in the WidgetDim being ignored entirely and only the ImageDim being recognized. We finally realized that every example of DimOperator uses the tag in conjunction with a UnifiedDim tag and changed our code accordingly. The following looknfeel code works:
Code: Select all
<Dim type="TopEdge">
<UnifiedDim scale="1" type="TopEdge"/>
<DimOperator op="Subtract">
<WidgetDim widget="__auto_titlebar__" dimension="Height" />
</DimOperator>
</Dim>
But that is only accounting for one variable dim, while we want to account for the variable dimensions of the titlebar height and image height. We tried nesting a DimOperator inside of the first, so that the value that is subtracted equals height of the titlebar widget and height of the image added together. Like so:
Code: Select all
<Dim type="TopEdge">
<UnifiedDim scale="1" type="TopEdge"/>
<DimOperator op="Subtract">
<WidgetDim widget="__auto_titlebar__" dimension="Height" />
<DimOperator op="Add">
<ImageDim imageset="IsLook" image="ISWindowTop" dimension="Height" />
</DimOperator>
</DimOperator>
</Dim>
This doesn't work--I think because we can't use DimOperator with WidgetDim, since it's not a UnifiedDim. Either way, we also tried using two separate DimOperator tags instead of nesting them:
Code: Select all
<Dim type="TopEdge">
<UnifiedDim scale="1" type="TopEdge"/>
<DimOperator op="Subtract">
<WidgetDim widget="__auto_titlebar__" dimension="Height" />
</DimOperator>
<DimOperator op="Subtract">
<ImageDim imageset="IsLook" image="ISWindowTop" dimension="Height" />
</DimOperator>
</Dim>
No go. This resulted in the top edge being 1 - height of the image; titlebar was ignored. This can only be observed when the window is transparent, since titlebar is drawn over top of the background.
What is the proper way to do what we are trying to do? We want topedge = 1 - (titlebarHeight + imageHeight), aka topedge = 1 - titlebarHeight - imageHeight, so that the top edge of our frame isn't being covered up by the background. Since it looks like DimOperator doesn't work in series or nested (unless we are doing it wrong) there must be another approach!