Length& numberOfLines,
float penY,
bool& isAutoScrollEnabled,
+ bool isAutoScrollMaxTextureExceeded,
DevelText::EllipsisPosition::Type ellipsisPosition,
bool enforceEllipsisInSingleLine)
{
- const bool ellipsis = enforceEllipsisInSingleLine || (isAutoScrollEnabled ? (penY - layout.descender > layoutParameters.boundingBox.height) : ((penY - layout.descender > layoutParameters.boundingBox.height) || ((mLayout == SINGLE_LINE_BOX) && (layout.length > layoutParameters.boundingBox.width))));
+ const bool ellipsis = enforceEllipsisInSingleLine || (isAutoScrollEnabled ? isAutoScrollMaxTextureExceeded : ((penY - layout.descender > layoutParameters.boundingBox.height) || ((mLayout == SINGLE_LINE_BOX) && (layout.length > layoutParameters.boundingBox.width))));
const bool isMultiline = !enforceEllipsisInSingleLine && (mLayout == MULTI_LINE_BOX);
if(ellipsis && (ellipsisPosition == DevelText::EllipsisPosition::END || !isMultiline))
{
- isAutoScrollEnabled = false;
- // Do not layout more lines if ellipsis is enabled.
+ if(penY - layout.descender > layoutParameters.boundingBox.height)
+ {
+ // Even if auto scroll is enabled and text is bigger than max texture size,
+ // if the the height is small, auto scroll should not work.
+ isAutoScrollEnabled = false;
+ }
+ // Do not layout more lines if ellipsis is enabled.
// The last line needs to be completely filled with characters.
// Part of a word may be used.
Size& layoutSize,
bool elideTextEnabled,
bool& isAutoScrollEnabled,
+ bool isAutoScrollMaxTextureExceeded,
DevelText::EllipsisPosition::Type ellipsisPosition)
{
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "-->LayoutText\n");
CharacterIndex lastCharacterInParagraph = currentParagraphRun.characterRun.characterIndex + currentParagraphRun.characterRun.numberOfCharacters - 1;
//check if this is the last line in paragraph, if false we should use the default relative line size (the one set using the property)
- if(lastCharacterInParagraph >= layout.characterIndex && lastCharacterInParagraph < layout.characterIndex+layout.numberOfCharacters)
+ if(lastCharacterInParagraph >= layout.characterIndex && lastCharacterInParagraph < layout.characterIndex + layout.numberOfCharacters)
{
layout.relativeLineSize = mRelativeLineSize;
}
numberOfLines,
penY,
isAutoScrollEnabled,
+ isAutoScrollMaxTextureExceeded,
ellipsisPosition,
false);
}
numberOfLines,
penY,
isAutoScrollEnabled,
+ isAutoScrollMaxTextureExceeded,
ellipsisPosition,
true);
}
Size& layoutSize,
bool elideTextEnabled,
bool& isAutoScrollEnabled,
+ bool isAutoScrollMaxTextureExceeded,
DevelText::EllipsisPosition::Type ellipsisPosition)
{
return mImpl->LayoutText(layoutParameters,
layoutSize,
elideTextEnabled,
isAutoScrollEnabled,
+ isAutoScrollMaxTextureExceeded,
ellipsisPosition);
}