Fix cursor visible issue on text background
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / text-controls / text-field-property-handler.cpp
index 40b3504..c4080b7 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -626,6 +626,15 @@ void TextField::PropertyHandler::SetProperty(Toolkit::TextField textField, Prope
       }
       break;
     }
+    case Toolkit::DevelTextField::Property::ENABLE_FONT_SIZE_SCALE:
+    {
+      const bool enableFontSizeScale = value.Get<bool>();
+      if(!Equals(impl.mController->IsFontSizeScaleEnabled(), enableFontSizeScale))
+      {
+        impl.mController->SetFontSizeScaleEnabled(enableFontSizeScale);
+      }
+      break;
+    }
     case Toolkit::DevelTextField::Property::PRIMARY_CURSOR_POSITION:
     {
       uint32_t position = static_cast<uint32_t>(value.Get<int>());
@@ -683,6 +692,14 @@ void TextField::PropertyHandler::SetProperty(Toolkit::TextField textField, Prope
       }
       break;
     }
+    case Toolkit::DevelTextField::Property::CHARACTER_SPACING:
+    {
+      const float characterSpacing = value.Get<float>();
+      DALI_LOG_INFO(gTextFieldLogFilter, Debug::General, "TextField %p CHARACTER_SPACING %d\n", impl.mController.Get(), characterSpacing);
+
+      impl.mController->SetCharacterSpacing(characterSpacing);
+      break;
+    }
   }
 }
 
@@ -1021,6 +1038,11 @@ Property::Value TextField::PropertyHandler::GetProperty(Toolkit::TextField textF
       value = impl.mController->GetFontSizeScale();
       break;
     }
+    case Toolkit::DevelTextField::Property::ENABLE_FONT_SIZE_SCALE:
+    {
+      value = impl.mController->IsFontSizeScaleEnabled();
+      break;
+    }
     case Toolkit::DevelTextField::Property::PRIMARY_CURSOR_POSITION:
     {
       value = static_cast<int>(impl.mController->GetPrimaryCursorPosition());
@@ -1053,6 +1075,11 @@ Property::Value TextField::PropertyHandler::GetProperty(Toolkit::TextField textF
       GetStrikethroughProperties(impl.mController, value, Text::EffectStyle::INPUT);
       break;
     }
+    case Toolkit::DevelTextField::Property::CHARACTER_SPACING:
+    {
+      value = impl.mController->GetCharacterSpacing();
+      break;
+    }
   } //switch
   return value;
 }