Merge changes I26f3edb0,Iba714851 into new_text
authorPaul Wisbey <p.wisbey@samsung.com>
Thu, 9 Apr 2015 15:43:18 +0000 (08:43 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 9 Apr 2015 15:43:18 +0000 (08:43 -0700)
* changes:
  Removed a float equality comparision
  Merge remote-tracking branch 'origin/tizen' into new_text

1  2 
dali-toolkit/internal/controls/text-controls/text-label-impl.cpp

@@@ -88,7 -88,6 +88,7 @@@ DALI_PROPERTY_REGISTRATION( TextLabel, 
  DALI_PROPERTY_REGISTRATION( TextLabel, "shadow-color",         VECTOR4, SHADOW_COLOR         )
  DALI_PROPERTY_REGISTRATION( TextLabel, "underline-enabled",    BOOLEAN, UNDERLINE_ENABLED    )
  DALI_PROPERTY_REGISTRATION( TextLabel, "underline-color",      VECTOR4, UNDERLINE_COLOR      )
 +DALI_PROPERTY_REGISTRATION( TextLabel, "underline-height",     FLOAT,   UNDERLINE_HEIGHT       )
  DALI_TYPE_REGISTRATION_END()
  
  } // namespace
@@@ -172,7 -171,7 +172,7 @@@ void TextLabel::SetProperty( BaseObject
          {
            float pointSize = value.Get< float >();
  
-           if( impl.mController->GetDefaultPointSize() != pointSize /*TODO - epsilon*/ )
+           if( fabsf(impl.mController->GetDefaultPointSize() - pointSize) > Math::MACHINE_EPSILON_1 )
            {
              impl.mController->SetDefaultPointSize( pointSize );
              impl.RequestTextRelayout();
          }
          break;
        }
 +
 +      case Toolkit::TextLabel::Property::UNDERLINE_HEIGHT:
 +      {
 +        if( impl.mController )
 +        {
 +          float height = value.Get< float >();
 +          if ( impl.mController->GetUnderlineHeight() != height )
 +          {
 +            impl.mController->SetUnderlineHeight( height );
 +            impl.RequestTextRelayout();
 +          }
 +        }
 +        break;
 +      }
      }
    }
  }
@@@ -402,14 -387,6 +402,14 @@@ Property::Value TextLabel::GetProperty
          }
          break;
        }
 +      case Toolkit::TextLabel::Property::UNDERLINE_HEIGHT:
 +      {
 +        if ( impl.mController )
 +        {
 +          value = impl.mController->GetUnderlineHeight();
 +        }
 +        break;
 +      }
      }
    }