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();
namespace Internal
{
-namespace
-{
-
enum PopupCustomisations
{
POPUP_MAXIMUM_SIZE,
OPTION_DIVIDER_SIZE
};
-} // namespace
-
class TextSelectionPopup : public Control
{
public:
namespace Internal
{
-namespace
-{
-
-} // namespace
-
class TextSelectionToolbar : public Control
{
public:
{
if( isLastLine && !isRTL )
{
+ // Add the length of the white saces at the end of the line.
lineLength += line.extraLength;
if( lineLength > boxWidth )
{
- 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;
}
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;
{
currentUnderlinePosition = descender;
}
- if ( ZERO == currentUnderlinePosition )
+ if( fabsf( currentUnderlinePosition ) < Math::MACHINE_EPSILON_1000 )
{
// Move offset down by one ( EFL behavior )
currentUnderlinePosition = ONE;
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 |