X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Ftext-controller-impl.cpp;h=57e51d11bcce4e1cf0571d787e0e186019476609;hp=566d7478c6bce939a8b219f24665ea81cc76b920;hb=2aab2479f7e6d127df4de063328570cc247ce6d4;hpb=c09d7cc6fb3a76ae145ca9195e773d6174020088 diff --git a/dali-toolkit/internal/text/text-controller-impl.cpp b/dali-toolkit/internal/text/text-controller-impl.cpp index 566d747..57e51d1 100644 --- a/dali-toolkit/internal/text/text-controller-impl.cpp +++ b/dali-toolkit/internal/text/text-controller-impl.cpp @@ -108,7 +108,8 @@ EventData::EventData( DecoratorPtr decorator ) mPasswordInput( false ), mIsPlaceholderPixelSize( false ), mIsPlaceholderElideEnabled( false ), - mPlaceholderEllipsisFlag( false ) + mPlaceholderEllipsisFlag( false ), + mShiftSelectionFlag( true ) { mImfManager = ImfManager::Get(); } @@ -888,7 +889,7 @@ bool Controller::Impl::UpdateModel( OperationsMask operationsRequired ) TextAbstraction::FontDescription defaultFontDescription; TextAbstraction::PointSize26Dot6 defaultPointSize = TextAbstraction::FontClient::DEFAULT_POINT_SIZE; - if( IsShowingPlaceholderText() && ( NULL != mEventData->mPlaceholderFont ) ) + if( IsShowingPlaceholderText() && mEventData && ( NULL != mEventData->mPlaceholderFont ) ) { // If the placeholder font is set specifically, only placeholder font is changed. defaultFontDescription = mEventData->mPlaceholderFont->mFontDescription; @@ -1251,7 +1252,7 @@ void Controller::Impl::OnCursorKeyEvent( const Event& event ) mEventData->mRightSelectionPosition = mEventData->mPrimaryCursorPosition; } - if ( isShiftModifier && IsShowingRealText() ) + if ( isShiftModifier && IsShowingRealText() && mEventData->mShiftSelectionFlag ) { // Handle text selection bool selecting = false; @@ -2291,7 +2292,7 @@ void Controller::Impl::RepositionSelectionHandles() const SelectionBoxInfo& firstSelectionBoxLineInfo = *( selectionBoxLinesInfo.Begin() ); highLightPosition.y = firstSelectionBoxLineInfo.lineOffset; - mEventData->mDecorator->SetHighLightBox( highLightPosition, highLightSize ); + mEventData->mDecorator->SetHighLightBox( highLightPosition, highLightSize, static_cast( mModel->GetOutlineWidth() ) ); if( !mEventData->mDecorator->IsSmoothHandlePanEnabled() ) { @@ -2711,6 +2712,13 @@ void Controller::Impl::GetCursorPosition( CharacterIndex logical, Text::GetCursorPosition( parameters, cursorInfo ); + // Adds Outline offset. + const float outlineWidth = static_cast( mModel->GetOutlineWidth() ); + cursorInfo.primaryPosition.x += outlineWidth; + cursorInfo.primaryPosition.y += outlineWidth; + cursorInfo.secondaryPosition.x += outlineWidth; + cursorInfo.secondaryPosition.y += outlineWidth; + if( isMultiLine ) { // If the text is editable and multi-line, the cursor position after a white space shouldn't exceed the boundaries of the text control.