Further header button details

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58301 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2009-01-22 14:28:07 +00:00
parent ecdf28983c
commit 6f91f3a333
3 changed files with 20 additions and 3 deletions

View File

@@ -349,6 +349,9 @@ wxRendererGeneric::DrawHeaderButtonContents(wxWindow *win,
dc.GetTextExtent( label, &tw, &th, &td);
labelWidth += tw;
y = rect.y + wxMax(0, (rect.height - (th+td)) / 2);
#ifdef __WXGTK__
y += 2; // No idea why.
#endif
// truncate and add an ellipsis (...) if the text is too wide.
int targetWidth = rect.width - arrowSpace - bmpWidth - 2*margin;