const char* const PROPERTY_NAME_ANCHOR_COLOR = "anchorColor";
const char* const PROPERTY_NAME_ANCHOR_CLICKED_COLOR = "anchorClickedColor";
+const char* const PROPERTY_NAME_REMOVE_FRONT_INSET = "removeFrontInset";
+const char* const PROPERTY_NAME_REMOVE_BACK_INSET = "removeBackInset";
+
const std::string DEFAULT_FONT_DIR("/resources/fonts");
const unsigned int EMOJI_FONT_SIZE = 3840u; // 60 * 64
DALI_TEST_CHECK(label.GetPropertyIndex(PROPERTY_NAME_STRIKETHROUGH) == DevelTextLabel::Property::STRIKETHROUGH);
DALI_TEST_CHECK(label.GetPropertyIndex(PROPERTY_NAME_ANCHOR_COLOR) == DevelTextLabel::Property::ANCHOR_COLOR);
DALI_TEST_CHECK(label.GetPropertyIndex(PROPERTY_NAME_ANCHOR_CLICKED_COLOR) == DevelTextLabel::Property::ANCHOR_CLICKED_COLOR);
+ DALI_TEST_CHECK(label.GetPropertyIndex(PROPERTY_NAME_REMOVE_FRONT_INSET) == DevelTextLabel::Property::REMOVE_FRONT_INSET);
+ DALI_TEST_CHECK(label.GetPropertyIndex(PROPERTY_NAME_REMOVE_BACK_INSET) == DevelTextLabel::Property::REMOVE_BACK_INSET);
END_TEST;
}
outlineMapSet["color"] = Color::RED;
outlineMapSet["width"] = 2.0f;
+ outlineMapSet["offset"] = Vector2(2.0f, 2.0f);
label.SetProperty(TextLabel::Property::OUTLINE, outlineMapSet);
outlineMapGet = label.GetProperty<Property::Map>(TextLabel::Property::OUTLINE);
outlineMapSet.Clear();
outlineMapSet[Toolkit::DevelText::Outline::Property::COLOR] = Color::BLUE;
outlineMapSet[Toolkit::DevelText::Outline::Property::WIDTH] = 3.0f;
+ outlineMapSet[Toolkit::DevelText::Outline::Property::OFFSET] = Vector2(3.0f, 3.0f);
+
label.SetProperty(TextLabel::Property::OUTLINE, outlineMapSet);
outlineMapGet = label.GetProperty<Property::Map>(TextLabel::Property::OUTLINE);
DALI_TEST_EQUALS(outlineMapGet.Count(), outlineMapSet.Count(), TEST_LOCATION);
- std::vector<std::string> outlineIndicesConversionTable = {"color", "width"};
+ std::vector<std::string> outlineIndicesConversionTable = {"color", "width", "offset"};
DALI_TEST_EQUALS(DaliTestCheckMaps(outlineMapGet, outlineMapSet, outlineIndicesConversionTable), true, TEST_LOCATION);
// Check the background property
application.SendNotification();
application.Render();
+ // Check Remove Front/Back Inset Property
+ DALI_TEST_CHECK(label.GetProperty<bool>(DevelTextLabel::Property::REMOVE_FRONT_INSET));
+ label.SetProperty(DevelTextLabel::Property::REMOVE_FRONT_INSET, false);
+ DALI_TEST_CHECK(!label.GetProperty<bool>(DevelTextLabel::Property::REMOVE_FRONT_INSET));
+
+ DALI_TEST_CHECK(label.GetProperty<bool>(DevelTextLabel::Property::REMOVE_BACK_INSET));
+ label.SetProperty(DevelTextLabel::Property::REMOVE_BACK_INSET, false);
+ DALI_TEST_CHECK(!label.GetProperty<bool>(DevelTextLabel::Property::REMOVE_BACK_INSET));
+
+ application.SendNotification();
+ application.Render();
+
END_TEST;
}
outlineMapSet["color"] = Color::BLUE;
outlineMapSet["width"] = 2.0f;
+ outlineMapSet["offset"] = "2 2";
label.SetProperty(TextLabel::Property::OUTLINE, outlineMapSet);
application.SendNotification();
TestTextGeometryUtils::CheckRectGeometryResult(textBoundingRectangle, expectedTextBoundingRectangle);
END_TEST;
+}
+
+int utcDaliTextLabelRemoveFrontInset(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" utcDaliTextLabelRemoveFrontInset");
+
+ TextLabel label = TextLabel::New();
+ DALI_TEST_CHECK(label);
+
+ application.GetScene().Add(label);
+ application.SendNotification();
+ application.Render();
+
+ DevelTextLabel::SetRemoveFrontInset(label, false);
+ DALI_TEST_CHECK(!DevelTextLabel::IsRemoveFrontInset(label));
+
+ END_TEST;
+}
+
+int utcDaliTextLabelRemoveBackInset(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" utcDaliTextLabelRemoveBackInset");
+
+ TextLabel label = TextLabel::New();
+ DALI_TEST_CHECK(label);
+
+ application.GetScene().Add(label);
+ application.SendNotification();
+ application.Render();
+
+ DevelTextLabel::SetRemoveBackInset(label, false);
+ DALI_TEST_CHECK(!DevelTextLabel::IsRemoveBackInset(label));
+
+ END_TEST;
}
\ No newline at end of file