Clip drawing of the icon and bitmap to the header rectangle.
Don't clip the text because we already ellipsize it to avoid overflowing but
do the ellipsization correctly, using wxControl::Ellipsize() instead of the
simple (and wrong) duplicated version here.
Also correct and simplify the alignment calculations.
Closes #12047.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64309
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775