From: Victor Cebollada Date: Thu, 21 Jul 2016 10:46:03 +0000 (+0100) Subject: TextEditor - Update the decoration box's size. X-Git-Tag: dali_1.2.0~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F38%2F81038%2F4;p=platform%2Fcore%2Fuifw%2Fdali-demo.git 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"