From a9263c8380f4df40f72d4a084da6b54d676ad5bd Mon Sep 17 00:00:00 2001 From: Victor Cebollada Date: Thu, 21 Jul 2016 11:46:03 +0100 Subject: [PATCH] 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 --- examples/text-editor/text-editor-example.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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" -- 2.7.4