Clip the last word of wxStaticText if it doesn't fit in wxOSX/Cocoa.

Until this change the entire last word disappeared, presumably because it was
wrapped to the next line, which was not shown at all. Now as much of it as
fits into the available space is shown, which is not ideal, but better than
before, especially if we're only a pixel or two short.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78064 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-10-24 21:54:41 +00:00
parent 434c95e1a1
commit 011a1356a8

View File

@@ -140,7 +140,7 @@ wxWidgetImplType* wxWidgetImpl::CreateStaticText( wxWindowMac* wxpeer,
[v setBezeled:NO];
[v setBordered:NO];
NSLineBreakMode linebreak = NSLineBreakByWordWrapping;
NSLineBreakMode linebreak = NSLineBreakByClipping;
if ( ((wxStaticText*)wxpeer)->IsEllipsized() )
{
if ( style & wxST_ELLIPSIZE_MIDDLE )