From: Shrouq Sabah Date: Sun, 17 Oct 2021 14:09:35 +0000 (+0300) Subject: Fix: The last line of the text overlaps with the text-editor's border/edge X-Git-Tag: dali_2.0.53~1^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=2c9abc8a3797a3317e0de7c23b1a15424facefb7 Fix: The last line of the text overlaps with the text-editor's border/edge This issue appears when ellipsis with start position is used with a large font. textEditor.SetProperty(TextEditor::Property::POINT_SIZE, 25); textEditor.SetProperty(Dali::Toolkit::DevelTextEditor::Property::ELLIPSIS, true); textEditor.SetProperty(Dali::Toolkit::DevelTextEditor::Property::ELLIPSIS_POSITION, Dali::Toolkit::DevelText::EllipsisPosition::START); Solution: Fixed early exit of loop that shift lines to up if ellipsis and multi lines and set ellipses of first line to true. Change-Id: Ib08ee17309058bc006c0bd3867c00a10745407bc --- diff --git a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Ellipsis.cpp b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Ellipsis.cpp index 872e85e..bab8800 100755 --- a/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Ellipsis.cpp +++ b/automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Ellipsis.cpp @@ -118,6 +118,21 @@ namespace const GlyphIndex firstMiddleIndexOfGlyphs = model->GetFirstMiddleIndexOfElidedGlyphs(); + //Test total height of lines is fit inside Controller's size + Length heightOfLines = 0; + for(Length lineIndex=0u; lineIndex < numberOfLines; lineIndex++) + { + const LineRun& tempLine = *( model->GetLines() + lineIndex); + heightOfLines+= (tempLine.ascender - tempLine.descender); + } + + if(heightOfLines > data.size.height) + { + std::cout << "The heightOfLines should be less than height of controller."; + std::cout << " The heightOfLines is "<< heightOfLines << "and the height of controller is "<< data.size.height <GetFirstMiddleIndexOfElidedGlyphs(); const GlyphIndex secondMiddleIndexOfGlyphs = textModel->GetSecondMiddleIndexOfElidedGlyphs(); + //Test total height of lines is fit inside Controller's size + Length heightOfLines = 0; + for(Length lineIndex=0u; lineIndex < numberOfLines; lineIndex++) + { + const LineRun& tempLine = *( textModel->GetLines() + lineIndex); + heightOfLines+= (tempLine.ascender - tempLine.descender); + } + + if(heightOfLines > data.size.height) + { + std::cout << "The heightOfLines should be less than height of controller."; + std::cout << " The heightOfLines is "<< heightOfLines << "and the height of controller is "<< data.size.height <