Change-Id: I339d9a45ebe0db37d885bd658ade44035586a9e5
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
if( impl.mController )
{
float height = value.Get< float >();
if( impl.mController )
{
float height = value.Get< float >();
- if ( impl.mController->GetUnderlineHeight() != height )
+ if( fabsf( impl.mController->GetUnderlineHeight() - height ) > Math::MACHINE_EPSILON_1000 )
{
impl.mController->SetUnderlineHeight( height );
impl.mRenderer.Reset();
{
impl.mController->SetUnderlineHeight( height );
impl.mRenderer.Reset();
enum PopupCustomisations
{
POPUP_MAXIMUM_SIZE,
enum PopupCustomisations
{
POPUP_MAXIMUM_SIZE,
class TextSelectionPopup : public Control
{
public:
class TextSelectionPopup : public Control
{
public:
-namespace
-{
-
-} // namespace
-
class TextSelectionToolbar : public Control
{
public:
class TextSelectionToolbar : public Control
{
public:
{
if( isLastLine && !isRTL )
{
{
if( isLastLine && !isRTL )
{
+ // Add the length of the white saces at the end of the line.
lineLength += line.extraLength;
if( lineLength > boxWidth )
{
lineLength += line.extraLength;
if( lineLength > boxWidth )
{
+ // The line's length is longer than the box's width.
+ // Set the line's offset to 0 and nothing else to do.
line.alignmentOffset = 0.f;
break;
}
line.alignmentOffset = 0.f;
break;
}
currentUnderlinePosition = ceil( fabsf( fontMetrics.underlinePosition ) );
const float descender = ceil( fabsf( fontMetrics.descender ) );
currentUnderlinePosition = ceil( fabsf( fontMetrics.underlinePosition ) );
const float descender = ceil( fabsf( fontMetrics.descender ) );
- if ( underlineHeight == ZERO )
+ if( fabsf( underlineHeight ) < Math::MACHINE_EPSILON_1000 )
{
currentUnderlineThickness = fontMetrics.underlineThickness;
{
currentUnderlineThickness = fontMetrics.underlineThickness;
{
currentUnderlinePosition = descender;
}
{
currentUnderlinePosition = descender;
}
- if ( ZERO == currentUnderlinePosition )
+ if( fabsf( currentUnderlinePosition ) < Math::MACHINE_EPSILON_1000 )
{
// Move offset down by one ( EFL behavior )
currentUnderlinePosition = ONE;
{
// Move offset down by one ( EFL behavior )
currentUnderlinePosition = ONE;
ProcessModifyEvents();
Size layoutSize;
ProcessModifyEvents();
Size layoutSize;
- if( width != mImpl->mVisualModel->mControlSize.width )
+ if( fabsf( width - mImpl->mVisualModel->mControlSize.width ) > Math::MACHINE_EPSILON_1000 )
{
// Operations that can be done only once until the text changes.
const OperationsMask onlyOnceOperations = static_cast<OperationsMask>( CONVERT_TO_UTF32 |
{
// Operations that can be done only once until the text changes.
const OperationsMask onlyOnceOperations = static_cast<OperationsMask>( CONVERT_TO_UTF32 |