X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller-relayouter.cpp;h=b9b4f56d7329d50f406aa3746ae1f3a85b08309f;hb=2de119eaa5b2c3947dddc35ee2621fe119e72cc0;hp=42199adb8a940941754803b5493b53d1e70704d1;hpb=abc8459e18c5a7f8730c9493885fd067126520cb;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/text/text-controller-relayouter.cpp b/dali-toolkit/internal/text/text-controller-relayouter.cpp index 42199ad..b9b4f56 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,12 @@ Size Controller::Relayouter::CalculateLayoutSizeOnRequiredControllerSize(Control { impl.UpdateModel(onlyOnceOperations); + if(impl.mIsAutoScrollEnabled) + { + // Layout the text for the new width. + operationsPending = static_cast(operationsPending | requestedOperationsMask); + } + DoRelayout(impl, requestedControllerSize, static_cast(onlyOnceOperations | requestedOperationsMask), @@ -619,12 +625,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 +807,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) {