Added custom painting for expandable components.