From 14c5da49f9e9c8a3495fb2f270ce94e7b9073ef5 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 31 Mar 2020 12:33:35 +0400 Subject: [PATCH] Improve multi-line texts with broken words. --- ui/text/text.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/text/text.cpp b/ui/text/text.cpp index 90f9f8e..a48abae 100644 --- a/ui/text/text.cpp +++ b/ui/text/text.cpp @@ -1245,7 +1245,7 @@ public: _wLeft -= _elideRemoveFromEnd; } - longWordLine = true; + longWordLine = !wordEndsHere; f = j + 1; f_wLeft = _wLeft; f_lineHeight = _lineHeight; @@ -3031,7 +3031,7 @@ void String::enumerateLines( last_rPadding = j->f_rpadding(); widthLeft = width - (j_width - last_rBearing); - longWordLine = true; + longWordLine = !wordEndsHere; f = j + 1; f_wLeft = widthLeft; f_lineHeight = lineHeight;