Clip drawing in wxRendererGeneric::DrawHeaderButtonContents().
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 15 May 2010 11:15:09 +0000 (11:15 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 15 May 2010 11:15:09 +0000 (11:15 +0000)
commit08043a1c27d89dd18b7c3d12bc45d777ec4bb97f
treef3c306c942982c656715965545c040ec13057269
parent78010a1f33c78f9ec6f17b2774a25ad71c5930fd
Clip drawing in wxRendererGeneric::DrawHeaderButtonContents().

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
src/generic/renderg.cpp