const Size controlSize(static_cast<float>(parameters.textWidth), static_cast<float>(parameters.textHeight));
// As relayout of text may not be done at this point natural size is used to get size. Single line scrolling only.
- const Size textNaturalSize = CalculateNaturalSize(parameters);
+ Size textNaturalSize = CalculateNaturalSize(parameters);
+ textNaturalSize.width += (parameters.padding.start + parameters.padding.end);
+ textNaturalSize.height += (parameters.padding.top + parameters.padding.bottom);
DALI_LOG_RELEASE_INFO("-->AsyncTextLoader::RenderAutoScroll natural size : %f, %f, control size : %f, %f \n", textNaturalSize.x, textNaturalSize.y, controlSize.x, controlSize.y);
// Size of the text control including padding.
Vector2 textControlSize(static_cast<float>(parameters.textWidth) + (parameters.padding.start + parameters.padding.end), static_cast<float>(parameters.textHeight) + (parameters.padding.top + parameters.padding.bottom));
+ if(parameters.isAutoScrollEnabled)
+ {
+ // In case of auto scroll, the layout width (renderInfo's width) is the natural size of the text.
+ // Since the layout size is the size of the visual transform, it should be reset to the text area excluding padding.
+ layoutSize.width = parameters.textWidth;
+ }
+
Vector2 visualTransformOffset;
if(renderInfo.isCutout)
{