From c826ed235591237d8bfbc1967bae5baa1ab28ced Mon Sep 17 00:00:00 2001 From: Abdulleh Ghujeh Date: Thu, 21 Apr 2022 10:40:26 +0300 Subject: [PATCH] fix incorrect selection highlight position with postive line spacing Change-Id: I411127b55c2bbbf0a1b5a6a1cdeb95d32ae8a429 --- dali-toolkit/internal/text/text-selection-handle-controller.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/dali-toolkit/internal/text/text-selection-handle-controller.cpp b/dali-toolkit/internal/text/text-selection-handle-controller.cpp index 05d8ad5..e4bf91c 100644 --- a/dali-toolkit/internal/text/text-selection-handle-controller.cpp +++ b/dali-toolkit/internal/text/text-selection-handle-controller.cpp @@ -286,12 +286,7 @@ void SelectionHandleController::Reposition(Controller::Impl& impl) selectionBoxInfo->maxX = MIN_FLOAT; // Update the line's vertical offset. - selectionBoxInfo->lineOffset = currentLineOffset + currentLineHeight; - - if(currentLineSpacing < 0) - { - selectionBoxInfo->lineOffset += currentLineSpacing; - } + selectionBoxInfo->lineOffset = currentLineOffset + currentLineHeight + currentLineSpacing; // The line height is the addition of the line ascender and the line descender. // However, the line descender has a negative value, hence the subtraction also line spacing should not be included in selection height. -- 2.7.4