From: Victor Cebollada Date: Thu, 21 Jul 2016 10:46:03 +0000 (+0100) Subject: [3.0] TextEditor - Update the decoration box's size. X-Git-Tag: accepted/tizen/common/20160830.150437~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F79%2F85279%2F3;p=platform%2Fcore%2Fuifw%2Fdali-demo.git [3.0] TextEditor - Update the decoration box's size. * Sets the decoration bounding box the size of the text-editor control. This prevents the popup to be positioned on top of the virtual keyboard or the top bar. Change-Id: I317d2289e740725b8e39746feeccad5ff664827e Signed-off-by: Victor Cebollada --- diff --git a/examples/text-editor/text-editor-example.cpp b/examples/text-editor/text-editor-example.cpp index 5ec61b7..eb83eec 100644 --- a/examples/text-editor/text-editor-example.cpp +++ b/examples/text-editor/text-editor-example.cpp @@ -131,6 +131,13 @@ public: mEditor.SetBackgroundColor( TEXT_EDITOR_BACKGROUND_COLOR ); + const Size boundingBoxSize( stageSize * TEXT_EDITOR_RELATIVE_SIZE.GetVectorXY() ); + Rect boundingBox( 0, + static_cast( toolBarHeight ), + static_cast( boundingBoxSize.width ), + static_cast( boundingBoxSize.height - toolBarHeight ) ); + + mEditor.SetProperty( TextEditor::Property::DECORATION_BOUNDING_BOX, boundingBox ); mEditor.SetProperty( TextEditor::Property::TEXT_COLOR, Color::BLACK ); mEditor.SetProperty( TextEditor::Property::TEXT, "Lorem ipsum dolor sit amet, aeque definiebas ea mei, posse iracundia ne cum.\n"