X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller-relayouter.cpp;h=527bb9962ac2b81cad3843c08b6c7e094e0b1b08;hp=42199adb8a940941754803b5493b53d1e70704d1;hb=9012617eed6ae42908bbb15363cc9db49af44e2d;hpb=abc8459e18c5a7f8730c9493885fd067126520cb diff --git a/dali-toolkit/internal/text/text-controller-relayouter.cpp b/dali-toolkit/internal/text/text-controller-relayouter.cpp index 42199ad..527bb99 100644 --- a/dali-toolkit/internal/text/text-controller-relayouter.cpp +++ b/dali-toolkit/internal/text/text-controller-relayouter.cpp @@ -67,7 +67,7 @@ Size Controller::Relayouter::CalculateLayoutSizeOnRequiredControllerSize(Control SHAPE_TEXT | GET_GLYPH_METRICS); - const OperationsMask sizeOperations = static_cast(LAYOUT | ALIGN | REORDER); + const OperationsMask sizeOperations = static_cast(LAYOUT | ALIGN | REORDER); // Set the update info to relayout the whole text. TextUpdateInfo& textUpdateInfo = impl.mTextUpdateInfo; @@ -93,6 +93,9 @@ Size Controller::Relayouter::CalculateLayoutSizeOnRequiredControllerSize(Control { impl.UpdateModel(onlyOnceOperations); + // Layout the text for the new width. + operationsPending = static_cast(operationsPending | requestedOperationsMask); + DoRelayout(impl, requestedControllerSize, static_cast(onlyOnceOperations | requestedOperationsMask), @@ -619,12 +622,15 @@ bool Controller::Relayouter::DoRelayout(Controller::Impl& impl, const Size& size } // Update the visual model. - bool isAutoScrollEnabled = impl.mIsAutoScrollEnabled; + bool isAutoScrollEnabled = impl.mIsAutoScrollEnabled; + bool isAutoScrollMaxTextureExceeded = impl.mIsAutoScrollMaxTextureExceeded; + Size newLayoutSize; viewUpdated = impl.mLayoutEngine.LayoutText(layoutParameters, newLayoutSize, elideTextEnabled, isAutoScrollEnabled, + isAutoScrollMaxTextureExceeded, ellipsisPosition); impl.mIsAutoScrollEnabled = isAutoScrollEnabled; @@ -798,13 +804,13 @@ void Controller::Relayouter::DoRelayoutHorizontalAlignment(Controller::Impl& void Controller::Relayouter::CalculateVerticalOffset(Controller::Impl& impl, const Size& controlSize) { - ModelPtr& model = impl.mModel; - VisualModelPtr& visualModel = model->mVisualModel; - Size layoutSize = model->mVisualModel->GetLayoutSize(); - Size oldLayoutSize = layoutSize; - float offsetY = 0.f; - bool needRecalc = false; - float defaultFontLineHeight = impl.GetDefaultFontLineHeight(); + ModelPtr& model = impl.mModel; + VisualModelPtr& visualModel = model->mVisualModel; + Size layoutSize = model->mVisualModel->GetLayoutSize(); + Size oldLayoutSize = layoutSize; + float offsetY = 0.f; + bool needRecalc = false; + float defaultFontLineHeight = impl.GetDefaultFontLineHeight(); if(fabsf(layoutSize.height) < Math::MACHINE_EPSILON_1000) {