X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-editor-property-handler.cpp;h=5ea2cf1829bd5b808d74bb4eb5de00caede3e528;hb=4e9ffb51cbdd54c16b75c21aa30051798a4f8e37;hp=5b6950fcfb81b34bbe3ef7ade13a6e4b77c5a161;hpb=fb87251cfeff34418a36798700b81786e522018a;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/controls/text-controls/text-editor-property-handler.cpp b/dali-toolkit/internal/controls/text-controls/text-editor-property-handler.cpp index 5b6950f..5ea2cf1 100644 --- a/dali-toolkit/internal/controls/text-controls/text-editor-property-handler.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-editor-property-handler.cpp @@ -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. @@ -610,6 +610,15 @@ void TextEditor::PropertyHandler::SetProperty(Toolkit::TextEditor textEditor, Pr } break; } + case Toolkit::DevelTextEditor::Property::ENABLE_FONT_SIZE_SCALE: + { + const bool enableFontSizeScale = value.Get(); + if(!Equals(impl.mController->IsFontSizeScaleEnabled(), enableFontSizeScale)) + { + impl.mController->SetFontSizeScaleEnabled(enableFontSizeScale); + } + break; + } case Toolkit::DevelTextEditor::Property::PRIMARY_CURSOR_POSITION: { uint32_t position = static_cast(value.Get()); @@ -707,6 +716,22 @@ void TextEditor::PropertyHandler::SetProperty(Toolkit::TextEditor textEditor, Pr } break; } + case Toolkit::DevelTextEditor::Property::CHARACTER_SPACING: + { + const float characterSpacing = value.Get(); + impl.mController->SetCharacterSpacing(characterSpacing); + impl.mRenderer.Reset(); + break; + } + case Toolkit::DevelTextEditor::Property::RELATIVE_LINE_SIZE: + { + const float relativeLineSize = value.Get(); + DALI_LOG_INFO(gTextEditorLogFilter, Debug::Verbose, "TextEditor %p RELATIVE_LINE_SIZE %f\n", impl.mController.Get(), relativeLineSize); + + impl.mController->SetRelativeLineSize(relativeLineSize); + impl.mRenderer.Reset(); + break; + } } } @@ -1060,6 +1085,11 @@ Property::Value TextEditor::PropertyHandler::GetProperty(Toolkit::TextEditor tex value = impl.mController->GetFontSizeScale(); break; } + case Toolkit::DevelTextEditor::Property::ENABLE_FONT_SIZE_SCALE: + { + value = impl.mController->IsFontSizeScaleEnabled(); + break; + } case Toolkit::DevelTextEditor::Property::PRIMARY_CURSOR_POSITION: { value = static_cast(impl.mController->GetPrimaryCursorPosition()); @@ -1104,6 +1134,16 @@ Property::Value TextEditor::PropertyHandler::GetProperty(Toolkit::TextEditor tex value = impl.mController->GetDefaultLineSize(); break; } + case Toolkit::DevelTextEditor::Property::CHARACTER_SPACING: + { + value = impl.mController->GetCharacterSpacing(); + break; + } + case Toolkit::DevelTextEditor::Property::RELATIVE_LINE_SIZE: + { + value = impl.mController->GetRelativeLineSize(); + break; + } } //switch return value; }