From: Joogab Yun Date: Thu, 27 Aug 2020 04:34:57 +0000 (+0900) Subject: New window is set to the layout direction of tyhe default window. X-Git-Tag: accepted/tizen/unified/20200831.001945~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4de170261d679dbe618535838450309e8c05c3d4;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git New window is set to the layout direction of tyhe default window. Change-Id: Ic81ecf8134e77b002c7f8ebee1780242e8f8e61c --- diff --git a/dali/internal/adaptor/common/adaptor-impl.cpp b/dali/internal/adaptor/common/adaptor-impl.cpp old mode 100644 new mode 100755 index 749f7af..a48b607 --- a/dali/internal/adaptor/common/adaptor-impl.cpp +++ b/dali/internal/adaptor/common/adaptor-impl.cpp @@ -667,6 +667,9 @@ bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow ) Internal::Adaptor::SceneHolder& windowImpl = Dali::GetImplementation( childWindow ); windowImpl.SetAdaptor( Get() ); + // ChildWindow is set to the layout direction of the default window. + windowImpl.GetRootLayer().SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, mRootLayoutDirection ); + // Add the new Window to the container - the order is not important mWindows.push_back( &windowImpl ); @@ -1216,7 +1219,8 @@ Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, mSocketFactory(), mThreadMode( threadMode ), mEnvironmentOptionsOwned( environmentOptions ? false : true /* If not provided then we own the object */ ), - mUseRemoteSurface( false ) + mUseRemoteSurface( false ), + mRootLayoutDirection( Dali::LayoutDirection::LEFT_TO_RIGHT ) { DALI_ASSERT_ALWAYS( !IsAvailable() && "Cannot create more than one Adaptor per thread" ); mWindows.insert( mWindows.begin(), &Dali::GetImplementation( window ) ); @@ -1226,11 +1230,11 @@ Adaptor::Adaptor(Dali::Integration::SceneHolder window, Dali::Adaptor& adaptor, void Adaptor::SetRootLayoutDirection( std::string locale ) { + mRootLayoutDirection = static_cast< LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) ); for ( auto& window : mWindows ) { Dali::Actor root = window->GetRootLayer(); - root.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, - static_cast< LayoutDirection::Type >( Internal::Adaptor::Locale::GetDirection( std::string( locale ) ) ) ); + root.SetProperty( Dali::Actor::Property::LAYOUT_DIRECTION, mRootLayoutDirection ); } } diff --git a/dali/internal/adaptor/common/adaptor-impl.h b/dali/internal/adaptor/common/adaptor-impl.h old mode 100644 new mode 100755 index aef70d9..5d0e63a --- a/dali/internal/adaptor/common/adaptor-impl.h +++ b/dali/internal/adaptor/common/adaptor-impl.h @@ -723,6 +723,7 @@ private: // Data ThreadMode mThreadMode; ///< The thread mode const bool mEnvironmentOptionsOwned:1; ///< Whether we own the EnvironmentOptions (and thus, need to delete it) bool mUseRemoteSurface:1; ///< whether the remoteSurface is used or not + Dali::LayoutDirection::Type mRootLayoutDirection; ///< LayoutDirection of window std::unique_ptr mAddOnManager; ///< Pointer to the addon manager