DALI_LOG_INFO(gLogFilter, Debug::Verbose, "TextLabel::SetProperty Property::FONT_FAMILY newFont(%s)\n", fontFamily.c_str());
impl.mController->SetDefaultFontFamily(fontFamily);
+ impl.mIsPropertyUpdated = true;
break;
}
case Toolkit::TextLabel::Property::FONT_STYLE:
{
SetFontStyleProperty(impl.mController, value, Text::FontStyle::DEFAULT);
+ impl.mIsPropertyUpdated = true;
break;
}
case Toolkit::TextLabel::Property::POINT_SIZE:
if(!Equals(impl.mController->GetDefaultFontSize(Text::Controller::POINT_SIZE), pointSize))
{
impl.mController->SetDefaultFontSize(pointSize, Text::Controller::POINT_SIZE);
+ impl.mIsPropertyUpdated = true;
}
break;
}
case Toolkit::TextLabel::Property::MULTI_LINE:
{
impl.mController->SetMultiLineEnabled(value.Get<bool>());
+ impl.mIsPropertyUpdated = true;
break;
}
case Toolkit::TextLabel::Property::HORIZONTAL_ALIGNMENT:
if(Text::GetHorizontalAlignmentEnumeration(value, alignment))
{
impl.mController->SetHorizontalAlignment(alignment);
+ impl.mIsPropertyUpdated = true;
}
break;
}
if(Text::GetVerticalAlignmentEnumeration(value, alignment))
{
impl.mController->SetVerticalAlignment(alignment);
+ impl.mIsPropertyUpdated = true;
}
break;
}
{
impl.mController->SetAutoScrollEnabled(enableAutoScroll);
}
+ impl.mIsPropertyUpdated = true;
}
break;
}
if(!Equals(impl.mController->GetDefaultFontSize(Text::Controller::PIXEL_SIZE), pixelSize))
{
impl.mController->SetDefaultFontSize(pixelSize, Text::Controller::PIXEL_SIZE);
+ impl.mIsPropertyUpdated = true;
}
break;
}
DALI_LOG_INFO(gLogFilter, Debug::General, "TextLabel %p ELLIPSIS %d\n", impl.mController.Get(), ellipsis);
impl.mController->SetTextElideEnabled(ellipsis);
+ impl.mIsPropertyUpdated = true;
break;
}
case Toolkit::TextLabel::Property::LINE_WRAP_MODE:
{
DALI_LOG_INFO(gLogFilter, Debug::General, "TextLabel %p LineWrap::MODE %d\n", impl.mController.Get(), lineWrapMode);
impl.mController->SetLineWrapMode(lineWrapMode);
+ impl.mIsPropertyUpdated = true;
}
break;
}
// No need to trigger full re-layout. Instead call UpdateRenderer() directly
TextVisual::UpdateRenderer(impl.mVisual);
+ impl.mIsPropertyUpdated = true;
}
break;
}
case Toolkit::DevelTextLabel::Property::IGNORE_SPACES_AFTER_TEXT:
{
impl.mController->SetIgnoreSpacesAfterText(value.Get<bool>());
+ impl.mIsPropertyUpdated = true;
break;
}
case Toolkit::DevelTextLabel::Property::MATCH_SYSTEM_LANGUAGE_DIRECTION:
{
impl.mController->SetMatchLayoutDirection(value.Get<bool>() ? DevelText::MatchLayoutDirection::LOCALE : DevelText::MatchLayoutDirection::CONTENTS);
+ impl.mIsPropertyUpdated = true;
break;
}
case Toolkit::DevelTextLabel::Property::TEXT_FIT:
ParseTextFitProperty(impl.mController, value.GetMap());
impl.mController->SetTextFitChanged(true);
+ impl.mIsPropertyUpdated = true;
break;
}
case Toolkit::DevelTextLabel::Property::MIN_LINE_SIZE:
impl.mTextUpdateNeeded = impl.mController->SetDefaultLineSize(lineSize) || impl.mTextUpdateNeeded;
}
impl.mController->SetCurrentLineSize(lineSize);
+ impl.mIsPropertyUpdated = true;
break;
}
case Toolkit::DevelTextLabel::Property::FONT_SIZE_SCALE:
if(!Equals(impl.mController->GetFontSizeScale(), scale))
{
impl.mController->SetFontSizeScale(scale);
+ impl.mIsPropertyUpdated = true;
}
break;
}
if(!Equals(impl.mController->IsFontSizeScaleEnabled(), enableFontSizeScale))
{
impl.mController->SetFontSizeScaleEnabled(enableFontSizeScale);
+ impl.mIsPropertyUpdated = true;
}
break;
}
{
DALI_LOG_INFO(gLogFilter, Debug::General, "TextLabel %p EllipsisPosition::Type %d\n", impl.mController.Get(), ellipsisPositionType);
impl.mController->SetEllipsisPosition(ellipsisPositionType);
+ impl.mIsPropertyUpdated = true;
}
break;
}
{
const float characterSpacing = value.Get<float>();
impl.mController->SetCharacterSpacing(characterSpacing);
+ impl.mIsPropertyUpdated = true;
break;
}
case Toolkit::DevelTextLabel::Property::RELATIVE_LINE_SIZE:
DALI_LOG_INFO(gLogFilter, Debug::Verbose, "TextLabel %p RELATIVE_LINE_SIZE %f\n", impl.mController.Get(), relativeLineSize);
impl.mController->SetRelativeLineSize(relativeLineSize);
+ impl.mIsPropertyUpdated = true;
break;
}
case Toolkit::DevelTextLabel::Property::ANCHOR_COLOR:
{
const bool remove = value.Get<bool>();
impl.mController->SetRemoveFrontInset(remove);
+ impl.mIsPropertyUpdated = true;
break;
}
case Toolkit::DevelTextLabel::Property::REMOVE_BACK_INSET:
{
const bool remove = value.Get<bool>();
impl.mController->SetRemoveBackInset(remove);
+ impl.mIsPropertyUpdated = true;
break;
}
case Toolkit::DevelTextLabel::Property::CUTOUT:
// No need to trigger full re-layout. Instead call UpdateRenderer() directly
TextVisual::UpdateRenderer(impl.mVisual);
+ impl.mIsPropertyUpdated = true;
break;
}
}
{
// need to request relayout as size of text may have changed
impl.RequestTextRelayout();
+ impl.mIsPropertyUpdated = true;
}
}
}
{
mController->SetDefaultColor(textColor);
mTextUpdateNeeded = true;
+ mIsPropertyUpdated = true;
}
break;
}
{
EnableControlBackground(false);
}
+ mIsPropertyUpdated = true;
}
break;
}
EnableControlBackground(!cutoutEnabled);
TextVisual::SetRequireRender(mVisual, cutoutEnabled);
}
+ mIsPropertyUpdated = true;
break;
}
default:
{
Control::OnPropertySet(index, propertyValue); // up call to control for non-handled properties
+ mIsPropertyUpdated = true;
break;
}
}
// When auto scroll is playing, a text load request is made only if a text update is absolutely necessary.
return;
}
+ if(!mIsPropertyUpdated)
+ {
+ return;
+ }
+
AsyncTextParameters parameters = GetAsyncTextParameters(contentSize, padding, layoutDirection);
TextVisual::UpdateAsyncRenderer(mVisual, parameters);
mTextUpdateNeeded = false;
+ mIsPropertyUpdated = false;
return;
}
mRenderingBackend(DEFAULT_RENDERING_BACKEND),
mTextUpdateNeeded(false),
mLastAutoScrollEnabled(false),
- mControlBackgroundEnabeld(true)
+ mControlBackgroundEnabeld(true),
+ mIsPropertyUpdated(false)
{
}