PDA

View Full Version : How do you make drop shadows on windows, like the debugger


hqm
01-21-2003, 03:37 PM
If you look at the source code for the debugger,
it defines two classes, one for the right shadow and one for the bottom:

<class name="debugger_shadow_bottom">
<resizelayout axis="x" />
<view resource="shadowLeft_rsc" />
<view resource="shadowBottom_rsc" stretches="width"
options="releasetolayout" />
</class>


<class name="debugger_shadow_right">
<stableborderlayout axis="y" />
<view resource="shadowTop_rsc" />
<view resource="shadowRight_rsc" stretches="height" />
<view resource="shadowCorner_rsc" />
</class>


Each shadow has a stretchy part and some end caps
graphics resources.


Then, in the main view of the debugger, these
views are placed

<debugger_shadow_bottom width="parent.width" opacity="0.75"
options="ignorelayout" y="parent.height" />
<debugger_shadow_right height="parent.height+4" x="parent.width"
opacity="0.75" options="ignorelayout" />