From: Victor Cebollada Date: Fri, 25 Nov 2016 10:27:35 +0000 (+0000) Subject: Control - Trigger the size negotiation when the background is updated. X-Git-Tag: dali_1.2.17~5^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=22153f233e289227ae2c70d75a0fcbd04fb10082;ds=sidebyside Control - Trigger the size negotiation when the background is updated. * It may be needed by the new visual to relayout its contents. i.e TextVisual needs it. Change-Id: I04498ed72b2ef94cccc2b3135adb66f5d2862e2d Signed-off-by: Victor Cebollada --- diff --git a/dali-toolkit/public-api/controls/control-impl.cpp b/dali-toolkit/public-api/controls/control-impl.cpp index 2bc13be..02bbf97 100644 --- a/dali-toolkit/public-api/controls/control-impl.cpp +++ b/dali-toolkit/public-api/controls/control-impl.cpp @@ -584,6 +584,9 @@ void Control::SetBackground( const Property::Map& map ) { RegisterVisual( Toolkit::Control::Property::BACKGROUND, visual ); visual.SetDepthIndex( DepthIndex::BACKGROUND ); + + // Trigger a size negotiation request that may be needed by the new visual to relayout its contents. + RelayoutRequest(); } } @@ -602,6 +605,9 @@ void Control::ClearBackground() { UnregisterVisual( Toolkit::Control::Property::BACKGROUND ); mImpl->mBackgroundColor = Color::TRANSPARENT; + + // Trigger a size negotiation request that may be needed when unregistering a visual. + RelayoutRequest(); } void Control::EnableGestureDetection(Gesture::Type type)