1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Removed some code that prevented RTL TextLayouts having their bounds adjusted

This commit is contained in:
jules 2016-04-14 16:34:26 +01:00
parent bb7189b05e
commit 871c3a9108
2 changed files with 5 additions and 5 deletions

View file

@ -242,7 +242,7 @@ void TextLayout::createLayout (const AttributedString& text, float maxWidth, flo
if (! createNativeLayout (text))
createStandardLayout (text);
recalculateSize (text);
recalculateSize();
}
void TextLayout::createLayoutWithBalancedLineLengths (const AttributedString& text, float maxWidth)
@ -540,7 +540,7 @@ namespace TextLayoutHelpers
static String getTrimmedEndIfNotAllWhitespace (const String& s)
{
String trimmed (s.trimEnd());
if (trimmed.isEmpty() && ! s.isEmpty())
if (trimmed.isEmpty() && s.isNotEmpty())
trimmed = s.replaceCharacters ("\r\n\t", " ");
return trimmed;
@ -560,9 +560,9 @@ void TextLayout::createStandardLayout (const AttributedString& text)
l.createLayout (text, *this);
}
void TextLayout::recalculateSize (const AttributedString& text)
void TextLayout::recalculateSize()
{
if (lines.size() > 0 && text.getReadingDirection() != AttributedString::rightToLeft)
if (lines.size() > 0)
{
Rectangle<float> bounds (lines.getFirst()->getLineBounds());