X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-label-impl.cpp;h=10b05a0af3ff5e7a61a698062feb070585e74f90;hb=85cc4dec9417a45d031bc8bc968e82df3339159e;hp=fb91c6f6609e30cce2599d9c9f1acce1c309989d;hpb=895806b4ad86de88dcc731aeb8e3dbe453ce4202;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp index fb91c6f..10b05a0 100644 --- a/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-label-impl.cpp @@ -140,6 +140,7 @@ DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextLabel, "enableFontSizeSc DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextLabel, "ellipsisPosition", INTEGER, ELLIPSIS_POSITION ) DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextLabel, "strikethrough", MAP, STRIKETHROUGH ) DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextLabel, "characterSpacing", FLOAT, CHARACTER_SPACING ) +DALI_DEVEL_PROPERTY_REGISTRATION(Toolkit, TextLabel, "relativeLineSize", FLOAT, RELATIVE_LINE_SIZE ) DALI_ANIMATABLE_PROPERTY_REGISTRATION_WITH_DEFAULT(Toolkit, TextLabel, "textColor", Color::BLACK, TEXT_COLOR ) DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION(Toolkit, TextLabel, "textColorRed", TEXT_COLOR_RED, TEXT_COLOR, 0) @@ -222,10 +223,10 @@ void ParseTextFitProperty(Text::ControllerPtr& controller, const Property::Map* } // namespace -Toolkit::TextLabel TextLabel::New() +Toolkit::TextLabel TextLabel::New(ControlBehaviour additionalBehaviour) { // Create the implementation, temporarily owned by this handle on stack - IntrusivePtr impl = new TextLabel(); + IntrusivePtr impl = new TextLabel(additionalBehaviour); // Pass ownership to CustomActor handle Toolkit::TextLabel handle(*impl); @@ -541,6 +542,14 @@ void TextLabel::SetProperty(BaseObject* object, Property::Index index, const Pro impl.mController->SetCharacterSpacing(characterSpacing); break; } + case Toolkit::DevelTextLabel::Property::RELATIVE_LINE_SIZE: + { + const float relativeLineSize = value.Get(); + DALI_LOG_INFO(gLogFilter, Debug::Verbose, "TextLabel %p RELATIVE_LINE_SIZE %f\n", impl.mController.Get(), relativeLineSize); + + impl.mController->SetRelativeLineSize(relativeLineSize); + break; + } } // Request relayout when text update is needed. It's necessary to call it @@ -799,6 +808,11 @@ Property::Value TextLabel::GetProperty(BaseObject* object, Property::Index index value = impl.mController->GetCharacterSpacing(); break; } + case Toolkit::DevelTextLabel::Property::RELATIVE_LINE_SIZE: + { + value = impl.mController->GetRelativeLineSize(); + break; + } } } @@ -1163,8 +1177,8 @@ void TextLabel::OnAccessibilityStatusChanged() CommonTextUtils::SynchronizeTextAnchorsInParent(Self(), mController, mAnchorActors); } -TextLabel::TextLabel() -: Control(ControlBehaviour(CONTROL_BEHAVIOUR_DEFAULT)), +TextLabel::TextLabel(ControlBehaviour additionalBehavior) +: Control(ControlBehaviour(CONTROL_BEHAVIOUR_DEFAULT | additionalBehavior)), mRenderingBackend(DEFAULT_RENDERING_BACKEND), mTextUpdateNeeded(false) {