{
if(impl.mTextScroller)
{
- impl.mTextScroller->StopScrolling();
+ impl.mTextScroller->StopScrolling(false);
}
}
// If request is enable (true) then start autoscroll as not already running
}
}
+void TextLabel::OnSceneConnection(int depth)
+{
+ if(mController->IsAutoScrollEnabled() || mLastAutoScrollEnabled)
+ {
+ mController->SetAutoScrollEnabled(true);
+ }
+ Control::OnSceneConnection(depth);
+}
+
+void TextLabel::OnSceneDisconnection()
+{
+ if(mTextScroller)
+ {
+ mLastAutoScrollEnabled = mController->IsAutoScrollEnabled();
+ mTextScroller->StopScrolling(true);
+ }
+ Control::OnSceneDisconnection();
+}
+
void TextLabel::OnRelayout(const Vector2& size, RelayoutContainer& container)
{
DALI_LOG_INFO(gLogFilter, Debug::General, "TextLabel::OnRelayout\n");
alignmentOffset.x = 0.0f;
alignmentOffset.y = (contentSize.y - layoutSize.y) * VERTICAL_ALIGNMENT_TABLE[mController->GetVerticalAlignment()];
+ const int maxTextureSize = Dali::GetMaxTextureSize();
+ if(layoutSize.width > maxTextureSize)
+ {
+ DALI_LOG_WARNING("layoutSize(%f) > maxTextureSize(%d): To guarantee the behavior of Texture::New, layoutSize must not be bigger than maxTextureSize\n", layoutSize.width, maxTextureSize);
+ layoutSize.width = maxTextureSize;
+ }
+
Property::Map visualTransform;
visualTransform.Add(Toolkit::Visual::Transform::Property::SIZE, layoutSize)
.Add(Toolkit::Visual::Transform::Property::SIZE_POLICY, Vector2(Toolkit::Visual::Transform::Policy::ABSOLUTE, Toolkit::Visual::Transform::Policy::ABSOLUTE))
TextLabel::TextLabel(ControlBehaviour additionalBehavior)
: Control(ControlBehaviour(CONTROL_BEHAVIOUR_DEFAULT | additionalBehavior)),
mRenderingBackend(DEFAULT_RENDERING_BACKEND),
- mTextUpdateNeeded(false)
+ mTextUpdateNeeded(false),
+ mLastAutoScrollEnabled(false)
{
}