Don't take trailing whitespace into account when ellipsizing
Trailing spaces and tabs are invisible, so the string shouldn't be truncated (possibly losing some printable characters that could have been displayed) just in order to show "..." instead of them.
This commit is contained in:
@@ -596,6 +596,7 @@ wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc,
|
||||
{
|
||||
if ( pc == label.end() || *pc == wxS('\n') )
|
||||
{
|
||||
curLine.Trim();
|
||||
curLine = DoEllipsizeSingleLine(curLine, dc, mode, maxFinalWidth,
|
||||
replacementWidth, flags);
|
||||
|
||||
|
Reference in New Issue
Block a user