return mController->GetHeightForWidth(width) + padding.top + padding.bottom;
}
+void TextEditor::ResizeActor(Actor& actor, const Vector2& size)
+{
+ if (actor.GetProperty<Vector3>(Dali::Actor::Property::SIZE).GetVectorXY() != size)
+ {
+ actor.SetProperty(Actor::Property::SIZE, size);
+ }
+}
+
void TextEditor::OnRelayout(const Vector2& size, RelayoutContainer& container)
{
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "TextEditor OnRelayout\n");
if(mStencil)
{
mStencil.SetProperty(Actor::Property::POSITION, Vector2(padding.start, padding.top));
+ ResizeActor(mStencil, contentSize);
}
if(mActiveLayer)
{
mActiveLayer.SetProperty(Actor::Property::POSITION, Vector2(padding.start, padding.top));
+ ResizeActor(mActiveLayer, contentSize);
}
const Text::Controller::UpdateTextType updateTextType = mController->Relayout(contentSize, layoutDirection);
if(mDecorator &&
(Text::Controller::NONE_UPDATED != (Text::Controller::DECORATOR_UPDATED & updateTextType)))
{
- mDecorator->Relayout(size);
+ mDecorator->Relayout(contentSize);
}
if(!mRenderer)