X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Ftext-controls%2Ftext-field-impl.cpp;h=8f0381e673f880706e4248346435e7b4f732ce8b;hp=7b2440425d5603aec0859b443d4bfb3f6d6adf6e;hb=93636543988d72ae45810bdf2347c2b0de8946f2;hpb=0d07bc303ad28647afa1342319721384cc37d19f diff --git a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp old mode 100644 new mode 100755 index 7b24404..8f0381e --- a/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp +++ b/dali-toolkit/internal/controls/text-controls/text-field-impl.cpp @@ -22,7 +22,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -1359,7 +1360,7 @@ void TextField::OnInitialize() // Fill-parent area by default self.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH ); self.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT ); - self.OnStageSignal().Connect( this, &TextField::OnStageConnect ); + self.OnSceneSignal().Connect( this, &TextField::OnSceneConnect ); DevelControl::SetInputMethodContext( *this, mInputMethodContext ); @@ -1433,7 +1434,15 @@ void TextField::OnRelayout( const Vector2& size, RelayoutContainer& container ) Vector2 contentSize( size.x - ( padding.start + padding.end ), size.y - ( padding.top + padding.bottom ) ); // Support Right-To-Left of padding - Dali::LayoutDirection::Type layoutDirection = static_cast( self.GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get() ); + Dali::LayoutDirection::Type layoutDirection; + if( mController->IsMatchSystemLanguageDirection() ) + { + layoutDirection = static_cast( DevelWindow::Get( self ).GetRootLayer().GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get() ); + } + else + { + layoutDirection = static_cast( self.GetProperty( Dali::Actor::Property::LAYOUT_DIRECTION ).Get() ); + } if( Dali::LayoutDirection::RIGHT_TO_LEFT == layoutDirection ) { std::swap( padding.start, padding.end ); @@ -1679,19 +1688,19 @@ void TextField::OnLongPress( const LongPressGesture& gesture ) bool TextField::OnKeyEvent( const KeyEvent& event ) { - DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnKeyEvent %p keyCode %d\n", mController.Get(), event.keyCode ); + DALI_LOG_INFO( gLogFilter, Debug::Verbose, "TextField::OnKeyEvent %p keyCode %d\n", mController.Get(), event.GetKeyCode() ); - if( Dali::DALI_KEY_ESCAPE == event.keyCode && mController->ShouldClearFocusOnEscape() ) + if( Dali::DALI_KEY_ESCAPE == event.GetKeyCode() && mController->ShouldClearFocusOnEscape() ) { // Make sure ClearKeyInputFocus when only key is up - if( event.state == KeyEvent::Up ) + if( event.GetState() == KeyEvent::UP ) { ClearKeyInputFocus(); } return true; } - else if( Dali::DevelKey::DALI_KEY_RETURN == event.keyCode ) + else if( Dali::DevelKey::DALI_KEY_RETURN == event.GetKeyCode() ) { // Do nothing when enter is comming. return false; @@ -1785,7 +1794,7 @@ void TextField::AddDecoration( Actor& actor, bool needsClipping ) } } -void TextField::OnStageConnect( Dali::Actor actor ) +void TextField::OnSceneConnect( Dali::Actor actor ) { if ( mHasBeenStaged ) { @@ -1855,20 +1864,20 @@ void TextField::KeyboardStatusChanged(bool keyboardShown) } } -void TextField::OnStageConnection( int depth ) +void TextField::OnSceneConnection( int depth ) { // Sets the depth to the visuals inside the text's decorator. mDecorator->SetTextDepth( depth ); // The depth of the text renderer is set in the RenderText() called from OnRelayout(). - // Call the Control::OnStageConnection() to set the depth of the background. - Control::OnStageConnection( depth ); + // Call the Control::OnSceneConnection() to set the depth of the background. + Control::OnSceneConnection( depth ); } -bool TextField::OnTouched( Actor actor, const TouchData& touch ) +bool TextField::OnTouched( Actor actor, const TouchEvent& touch ) { - return true; + return false; } void TextField::OnIdleSignal()