Add TextFitArray to text label 57/299557/4
authorBowon Ryu <bowon.ryu@samsung.com>
Thu, 5 Oct 2023 02:29:45 +0000 (11:29 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Tue, 10 Oct 2023 06:49:18 +0000 (15:49 +0900)
commit24024a00f26ee1b4b5d9f703ebbbb15d01668f44
treed47a7738cece750d79d371504cb35155e8c3936a
parentffb06a29ba877bdd743684d1de08081a897e38cf
Add TextFitArray to text label

Add a new function to satisfy the UX that
operates TextFit by considering the PointSize and MinLineSize of the text.

For example, TextFit should be able to find the one that
fits among [PointSize 24 + MinLineSize 40] or [PointSize 28 + MinLineSize 44].

But the previous TextFit only considers PointSize.

TextFitArray can solve this problem,
and this implemented it to respond to additional requirements without modifying the API.

Simple usage:
std::vector<DevelTextLabel::FitOption> fitOptions;
fitOptions.push_back(DevelTextLabel::FitOption(24, 40));
fitOptions.push_back(DevelTextLabel::FitOption(28, 44));
DevelTextLabel::SetTextFitArray(textLabel, true, fitOptions);

Change-Id: Ib608465c8f4c96c56e471f14064e4e2d24377a8f
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
dali-toolkit/devel-api/controls/text-controls/text-label-devel.cpp
dali-toolkit/devel-api/controls/text-controls/text-label-devel.h
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp
dali-toolkit/internal/controls/text-controls/text-label-impl.h
dali-toolkit/internal/text/controller/text-controller-impl-model-updater.cpp
dali-toolkit/internal/text/controller/text-controller-impl.h
dali-toolkit/internal/text/controller/text-controller-relayouter.cpp
dali-toolkit/internal/text/controller/text-controller-relayouter.h
dali-toolkit/internal/text/controller/text-controller.cpp
dali-toolkit/internal/text/controller/text-controller.h