[Tizen] Resolve incorrect position for Ellipsis when mixed LTR & RTL languages and... 66/276066/1
authorssabah <s.sabah@samsung.com>
Sun, 5 Jun 2022 12:08:04 +0000 (15:08 +0300)
committerBowon Ryu <bowon.ryu@samsung.com>
Thu, 9 Jun 2022 06:21:01 +0000 (15:21 +0900)
commit1a20707a6caaecb20a79bbf20d9807cc4493d595
tree3c56e622c5bb4899bdc40645aecddb8a8cf040e8
parent79f95f0a8bdb4bb4699e2d8279ce16b25d03ec20
[Tizen] Resolve incorrect position for Ellipsis when mixed LTR & RTL languages and set layout direction RTL

Here's sample code for issues:
    //Case 1:
    TextLabel textLabel = TextLabel::New("Projector استكشاف");
    textLabel.SetProperty(Dali::Toolkit::DevelTextLabel::Property::ELLIPSIS, true);
    textLabel.SetProperty(Dali::Toolkit::DevelTextLabel::Property::ELLIPSIS_POSITION, Dali::Toolkit::DevelText::EllipsisPosition::END);
    textLabel.SetProperty(Dali::Actor::Property::LAYOUT_DIRECTION, LayoutDirection::RIGHT_TO_LEFT);
    textLabel.SetProperty(Actor::Property::SIZE, Vector2(145.0f, 60.0f)); // minimize width until the ellipsis comes between two languages

    //Case 2:
    TextLabel textLabel = TextLabel::New("استكشاف Projector");
    textLabel.SetProperty(Dali::Toolkit::DevelTextLabel::Property::ELLIPSIS, true);
    textLabel.SetProperty(Dali::Toolkit::DevelTextLabel::Property::ELLIPSIS_POSITION, Dali::Toolkit::DevelText::EllipsisPosition::START);
    textLabel.SetProperty(Dali::Actor::Property::LAYOUT_DIRECTION, LayoutDirection::RIGHT_TO_LEFT);
    textLabel.SetProperty(Actor::Property::SIZE, Vector2(145.0f, 60.0f)); // minimize width until the ellipsis comes between two languages

Change-Id: I6dc8fc429a80eb767bc65eace9ef356a7763c585
automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Ellipsis.cpp
dali-toolkit/internal/text/rendering/view-model.cpp
dali-toolkit/internal/text/text-view.cpp