From 011a1356a89477c31f912a7f94d66e4bb9c9a582 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 24 Oct 2014 21:54:41 +0000 Subject: [PATCH] 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 --- src/osx/cocoa/stattext.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osx/cocoa/stattext.mm b/src/osx/cocoa/stattext.mm index d9418a7518..ea8b8e53fb 100644 --- a/src/osx/cocoa/stattext.mm +++ b/src/osx/cocoa/stattext.mm @@ -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 )