Merge "Prevent height adjustment of TextLabel" into devel/master
authorjoogab yun <joogab.yun@samsung.com>
Thu, 4 Mar 2021 06:53:55 +0000 (06:53 +0000)
committerGerrit Code Review <gerrit@review>
Thu, 4 Mar 2021 06:53:55 +0000 (06:53 +0000)
dali-toolkit/internal/text/text-controller-relayouter.cpp

index 8888859..a900601 100644 (file)
@@ -651,7 +651,9 @@ void Controller::Relayouter::CalculateVerticalOffset(Controller& controller, con
     layoutSize.height = defaultFontLineHeight;
   }
 
-  if (layoutSize.height != defaultFontLineHeight)
+  // Whether the text control is editable
+  const bool isEditable = NULL != impl.mEventData;
+  if (isEditable && layoutSize.height != defaultFontLineHeight)
   {
     // This code prevents the wrong positioning of cursor when the layout size is bigger/smaller than defaultFontLineHeight.
     // This situation occurs when the size of placeholder text is different from the default text.