Updated all cpp files to new format
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / scroll-bar / scroll-bar-impl.cpp
index 0627759..4701d6c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 #include <dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.h>
 
 // EXTERNAL INCLUDES
-#include <cstring> // for strcmp
+#include <dali/devel-api/actors/actor-devel.h>
+#include <dali/devel-api/object/property-helper-devel.h>
+#include <dali/integration-api/debug.h>
 #include <dali/public-api/animation/constraint.h>
 #include <dali/public-api/animation/constraints.h>
-#include <dali/public-api/object/type-registry.h>
 #include <dali/public-api/object/property-array.h>
 #include <dali/public-api/object/type-registry-helper.h>
-#include <dali/integration-api/debug.h>
-#include <dali/devel-api/object/property-helper-devel.h>
-#include <dali/devel-api/actors/actor-devel.h>
+#include <dali/public-api/object/type-registry.h>
+#include <cstring> // for strcmp
 
 // INTERNAL INCLUDES
 #include <dali-toolkit/devel-api/asset-manager/asset-manager.h>
@@ -38,7 +38,6 @@ using namespace Dali;
 
 namespace
 {
-
 const char* DEFAULT_INDICATOR_IMAGE_FILE_NAME = "popup_scroll.9.png";
 const float DEFAULT_SLIDER_DEPTH(1.0f);
 const float DEFAULT_INDICATOR_SHOW_DURATION(0.5f);
@@ -60,9 +59,9 @@ struct IndicatorSizeConstraint
    * @param[in] minimumHeight The minimum height for the indicator
    * @param[in] padding The sum of the padding at the start & end of the indicator
    */
-  IndicatorSizeConstraint( float minimumHeight, float padding )
-  : mMinimumHeight( minimumHeight ),
-    mPadding( padding )
+  IndicatorSizeConstraint(float minimumHeight, float padding)
+  : mMinimumHeight(minimumHeight),
+    mPadding(padding)
   {
   }
 
@@ -72,19 +71,17 @@ struct IndicatorSizeConstraint
    * @param[in] parentSizeProperty The parent size of scroll indicator.
    * @return The new scroll indicator size.
    */
-  void operator()( Vector3& current, const PropertyInputContainer& inputs )
+  void operator()(Vector3& current, const PropertyInputContainer& inputs)
   {
-    const Vector3& parentSize = inputs[0]->GetVector3();
-    const float contentSize = inputs[1]->GetFloat();
+    const Vector3& parentSize  = inputs[0]->GetVector3();
+    const float    contentSize = inputs[1]->GetFloat();
 
     // Take into account padding that may exist at the beginning and end of the indicator.
     const float parentHeightMinusPadding = parentSize.height - mPadding;
 
-    float height = contentSize > parentHeightMinusPadding ?
-                   parentHeightMinusPadding * ( parentHeightMinusPadding / contentSize ) :
-                   parentHeightMinusPadding * ( ( parentHeightMinusPadding - contentSize * 0.5f ) / parentHeightMinusPadding );
+    float height = contentSize > parentHeightMinusPadding ? parentHeightMinusPadding * (parentHeightMinusPadding / contentSize) : parentHeightMinusPadding * ((parentHeightMinusPadding - contentSize * 0.5f) / parentHeightMinusPadding);
 
-    current.y = std::max( mMinimumHeight, height );
+    current.y = std::max(mMinimumHeight, height);
   }
 
   float mMinimumHeight;
@@ -101,9 +98,9 @@ struct IndicatorPositionConstraint
    * @param[in] startPadding The padding at the start of the indicator
    * @param[in] endPadding The padding at the end of the indicator
    */
-  IndicatorPositionConstraint( float startPadding, float endPadding )
-  : mStartPadding( startPadding ),
-    mEndPadding( endPadding )
+  IndicatorPositionConstraint(float startPadding, float endPadding)
+  : mStartPadding(startPadding),
+    mEndPadding(endPadding)
   {
   }
 
@@ -113,20 +110,20 @@ struct IndicatorPositionConstraint
    * @param[in] inputs Contains the size of indicator, the size of indicator's parent, and the scroll position of the scrollable container (from 0.0 -> 1.0 in each axis)
    * @return The new indicator position is returned.
    */
-  void operator()( Vector3& current, const PropertyInputContainer& inputs )
+  void operator()(Vector3& current, const PropertyInputContainer& inputs)
   {
-    const Vector3& indicatorSize = inputs[0]->GetVector3();
-    const Vector3& parentSize = inputs[1]->GetVector3();
-    const float scrollPosition = -inputs[2]->GetFloat();
-    const float minimumScrollPosition = inputs[3]->GetFloat();
-    const float maximumScrollPosition = inputs[4]->GetFloat();
+    const Vector3& indicatorSize         = inputs[0]->GetVector3();
+    const Vector3& parentSize            = inputs[1]->GetVector3();
+    const float    scrollPosition        = -inputs[2]->GetFloat();
+    const float    minimumScrollPosition = inputs[3]->GetFloat();
+    const float    maximumScrollPosition = inputs[4]->GetFloat();
 
     // Take into account padding that may exist at the beginning and end of the indicator.
-    const float parentHeightMinusPadding = parentSize.height - ( mStartPadding + mEndPadding );
+    const float parentHeightMinusPadding = parentSize.height - (mStartPadding + mEndPadding);
 
-    float relativePosition = std::max( 0.0f, std::min( 1.0f, ( scrollPosition - minimumScrollPosition ) / ( maximumScrollPosition - minimumScrollPosition ) ) );
-    current.y = mStartPadding + ( parentHeightMinusPadding - indicatorSize.height ) * relativePosition;
-    current.z = DEFAULT_SLIDER_DEPTH;
+    float relativePosition = std::max(0.0f, std::min(1.0f, (scrollPosition - minimumScrollPosition) / (maximumScrollPosition - minimumScrollPosition)));
+    current.y              = mStartPadding + (parentHeightMinusPadding - indicatorSize.height) * relativePosition;
+    current.z              = DEFAULT_SLIDER_DEPTH;
   }
 
   float mStartPadding;
@@ -137,16 +134,12 @@ struct IndicatorPositionConstraint
 
 namespace Dali
 {
-
 namespace Toolkit
 {
-
 namespace Internal
 {
-
 namespace
 {
-
 using namespace Dali;
 
 BaseHandle Create()
@@ -154,36 +147,38 @@ BaseHandle Create()
   return Toolkit::ScrollBar::New();
 }
 
+// clang-format off
 // Setup properties, signals and actions using the type-registry.
 DALI_TYPE_REGISTRATION_BEGIN( Toolkit::ScrollBar, Toolkit::Control, Create );
 
-DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "scrollDirection",                   STRING, SCROLL_DIRECTION             )
-DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicatorHeightPolicy",             STRING, INDICATOR_HEIGHT_POLICY      )
-DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicatorFixedHeight",              FLOAT,  INDICATOR_FIXED_HEIGHT       )
-DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicatorShowDuration",             FLOAT,  INDICATOR_SHOW_DURATION      )
-DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicatorHideDuration",             FLOAT,  INDICATOR_HIDE_DURATION      )
-DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "scrollPositionIntervals",           ARRAY,  SCROLL_POSITION_INTERVALS    )
-DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicatorMinimumHeight",            FLOAT,  INDICATOR_MINIMUM_HEIGHT     )
-DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicatorStartPadding",             FLOAT,  INDICATOR_START_PADDING      )
-DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicatorEndPadding",               FLOAT,  INDICATOR_END_PADDING        )
-DALI_PROPERTY_REGISTRATION( Toolkit, ScrollBar, "indicatorTransientDuration",        FLOAT,  INDICATOR_TRANSIENT_DURATION )
+DALI_PROPERTY_REGISTRATION(Toolkit, ScrollBar, "scrollDirection",            STRING, SCROLL_DIRECTION            )
+DALI_PROPERTY_REGISTRATION(Toolkit, ScrollBar, "indicatorHeightPolicy",      STRING, INDICATOR_HEIGHT_POLICY     )
+DALI_PROPERTY_REGISTRATION(Toolkit, ScrollBar, "indicatorFixedHeight",       FLOAT,  INDICATOR_FIXED_HEIGHT      )
+DALI_PROPERTY_REGISTRATION(Toolkit, ScrollBar, "indicatorShowDuration",      FLOAT,  INDICATOR_SHOW_DURATION     )
+DALI_PROPERTY_REGISTRATION(Toolkit, ScrollBar, "indicatorHideDuration",      FLOAT,  INDICATOR_HIDE_DURATION     )
+DALI_PROPERTY_REGISTRATION(Toolkit, ScrollBar, "scrollPositionIntervals",    ARRAY,  SCROLL_POSITION_INTERVALS   )
+DALI_PROPERTY_REGISTRATION(Toolkit, ScrollBar, "indicatorMinimumHeight",     FLOAT,  INDICATOR_MINIMUM_HEIGHT    )
+DALI_PROPERTY_REGISTRATION(Toolkit, ScrollBar, "indicatorStartPadding",      FLOAT,  INDICATOR_START_PADDING     )
+DALI_PROPERTY_REGISTRATION(Toolkit, ScrollBar, "indicatorEndPadding",        FLOAT,  INDICATOR_END_PADDING       )
+DALI_PROPERTY_REGISTRATION(Toolkit, ScrollBar, "indicatorTransientDuration", FLOAT,  INDICATOR_TRANSIENT_DURATION)
 
-DALI_SIGNAL_REGISTRATION(   Toolkit, ScrollBar, "panFinished",                       PAN_FINISHED_SIGNAL                     )
-DALI_SIGNAL_REGISTRATION(   Toolkit, ScrollBar, "scrollPositionIntervalReached",     SCROLL_POSITION_INTERVAL_REACHED_SIGNAL )
+DALI_SIGNAL_REGISTRATION(Toolkit, ScrollBar, "panFinished",                   PAN_FINISHED_SIGNAL                    )
+DALI_SIGNAL_REGISTRATION(Toolkit, ScrollBar, "scrollPositionIntervalReached", SCROLL_POSITION_INTERVAL_REACHED_SIGNAL)
 
-DALI_ACTION_REGISTRATION(   Toolkit, ScrollBar, "ShowIndicator",                     ACTION_SHOW_INDICATOR                   )
-DALI_ACTION_REGISTRATION(   Toolkit, ScrollBar, "HideIndicator",                     ACTION_HIDE_INDICATOR                   )
-DALI_ACTION_REGISTRATION(   Toolkit, ScrollBar, "ShowTransientIndicator",            ACTION_SHOW_TRANSIENT_INDICATOR         )
+DALI_ACTION_REGISTRATION(Toolkit, ScrollBar, "ShowIndicator",          ACTION_SHOW_INDICATOR          )
+DALI_ACTION_REGISTRATION(Toolkit, ScrollBar, "HideIndicator",          ACTION_HIDE_INDICATOR          )
+DALI_ACTION_REGISTRATION(Toolkit, ScrollBar, "ShowTransientIndicator", ACTION_SHOW_TRANSIENT_INDICATOR)
 
 DALI_TYPE_REGISTRATION_END()
+// clang-format on
 
-const char* SCROLL_DIRECTION_NAME[] = {"VERTICAL", "HORIZONTAL"};
+const char* SCROLL_DIRECTION_NAME[]        = {"VERTICAL", "HORIZONTAL"};
 const char* INDICATOR_HEIGHT_POLICY_NAME[] = {"VARIABLE", "FIXED"};
 
-}
+} // namespace
 
 ScrollBar::ScrollBar(Toolkit::ScrollBar::Direction direction)
-: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
+: Control(ControlBehaviour(CONTROL_BEHAVIOUR_DEFAULT)),
   mIndicatorShowAlpha(1.0f),
   mDirection(direction),
   mScrollableObject(WeakHandle<Handle>()),
@@ -195,7 +190,7 @@ ScrollBar::ScrollBar(Toolkit::ScrollBar::Direction direction)
   mIndicatorHideDuration(DEFAULT_INDICATOR_HIDE_DURATION),
   mTransientIndicatorDuration(DEFAULT_INDICATOR_TRANSIENT_DURATION),
   mScrollStart(0.0f),
-  mGestureDisplacement( Vector2::ZERO ),
+  mGestureDisplacement(Vector2::ZERO),
   mCurrentScrollPosition(0.0f),
   mIndicatorHeightPolicy(Toolkit::ScrollBar::VARIABLE),
   mIndicatorFixedHeight(DEFAULT_INDICATOR_FIXED_HEIGHT),
@@ -214,24 +209,20 @@ ScrollBar::~ScrollBar()
 void ScrollBar::OnInitialize()
 {
   CreateDefaultIndicatorActor();
-  Self().SetProperty( Actor::Property::DRAW_MODE,DrawMode::OVERLAY_2D);
+  Self().SetProperty(Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D);
 
-  DevelControl::SetAccessibilityConstructor( Self(), []( Dali::Actor actor ) {
-    return std::unique_ptr< Dali::Accessibility::Accessible >(
-      new AccessibleImpl( actor, Dali::Accessibility::Role::SCROLL_BAR ) );
-  } );
+  DevelControl::SetAccessibilityConstructor(Self(), [](Dali::Actor actor) {
+    return std::unique_ptr<Dali::Accessibility::Accessible>(
+      new AccessibleImpl(actor, Dali::Accessibility::Role::SCROLL_BAR));
+  });
 }
 
-void ScrollBar::SetScrollPropertySource( Handle handle, Property::Index propertyScrollPosition, Property::Index propertyMinScrollPosition, Property::Index propertyMaxScrollPosition, Property::Index propertyScrollContentSize )
+void ScrollBar::SetScrollPropertySource(Handle handle, Property::Index propertyScrollPosition, Property::Index propertyMinScrollPosition, Property::Index propertyMaxScrollPosition, Property::Index propertyScrollContentSize)
 {
-  if( handle
-      && propertyScrollPosition != Property::INVALID_INDEX
-      && propertyMinScrollPosition != Property::INVALID_INDEX
-      && propertyMaxScrollPosition != Property::INVALID_INDEX
-      && propertyScrollContentSize != Property::INVALID_INDEX )
+  if(handle && propertyScrollPosition != Property::INVALID_INDEX && propertyMinScrollPosition != Property::INVALID_INDEX && propertyMaxScrollPosition != Property::INVALID_INDEX && propertyScrollContentSize != Property::INVALID_INDEX)
   {
-    mScrollableObject = WeakHandle<Handle>(handle);
-    mPropertyScrollPosition = propertyScrollPosition;
+    mScrollableObject          = WeakHandle<Handle>(handle);
+    mPropertyScrollPosition    = propertyScrollPosition;
     mPropertyMinScrollPosition = propertyMinScrollPosition;
     mPropertyMaxScrollPosition = propertyMaxScrollPosition;
     mPropertyScrollContentSize = propertyScrollContentSize;
@@ -246,43 +237,43 @@ void ScrollBar::SetScrollPropertySource( Handle handle, Property::Index property
 
 void ScrollBar::CreateDefaultIndicatorActor()
 {
-  const std::string imageDirPath = AssetManager::GetDaliImagePath();
-  Toolkit::ImageView indicator = Toolkit::ImageView::New( imageDirPath + DEFAULT_INDICATOR_IMAGE_FILE_NAME );
-  indicator.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
-  indicator.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
-  indicator.SetStyleName( "ScrollBarIndicator" );
-  indicator.SetProperty( Actor::Property::COLOR_MODE, USE_OWN_MULTIPLY_PARENT_COLOR );
+  const std::string  imageDirPath = AssetManager::GetDaliImagePath();
+  Toolkit::ImageView indicator    = Toolkit::ImageView::New(imageDirPath + DEFAULT_INDICATOR_IMAGE_FILE_NAME);
+  indicator.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
+  indicator.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
+  indicator.SetStyleName("ScrollBarIndicator");
+  indicator.SetProperty(Actor::Property::COLOR_MODE, USE_OWN_MULTIPLY_PARENT_COLOR);
   SetScrollIndicator(indicator);
 }
 
-void ScrollBar::SetScrollIndicator( Actor indicator )
+void ScrollBar::SetScrollIndicator(Actor indicator)
 {
   // Don't allow empty handle
-  if( indicator )
+  if(indicator)
   {
     // Remove current Indicator
-    if( mIndicator )
+    if(mIndicator)
     {
-      Self().Remove( mIndicator );
+      Self().Remove(mIndicator);
     }
     mIndicator = indicator;
 
     mIndicatorFirstShow = true;
-    Self().Add( mIndicator );
+    Self().Add(mIndicator);
 
-    EnableGestureDetection( GestureType::Value( GestureType::PAN ) );
+    EnableGestureDetection(GestureType::Value(GestureType::PAN));
 
-    PanGestureDetector detector( GetPanGestureDetector() );
+    PanGestureDetector detector(GetPanGestureDetector());
     detector.DetachAll();
-    detector.Attach( mIndicator );
+    detector.Attach(mIndicator);
 
     unsigned int childCount = mIndicator.GetChildCount();
-    for ( unsigned int index = 0; index < childCount; index++ )
+    for(unsigned int index = 0; index < childCount; index++)
     {
-      Actor child = mIndicator.GetChildAt( index );
-      if ( child )
+      Actor child = mIndicator.GetChildAt(index);
+      if(child)
       {
-        detector.Attach( child );
+        detector.Attach(child);
       }
     }
   }
@@ -301,7 +292,7 @@ void ScrollBar::ApplyConstraints()
 {
   Handle scrollableHandle = mScrollableObject.GetHandle();
 
-  if( scrollableHandle )
+  if(scrollableHandle)
   {
     if(mIndicatorSizeConstraint)
     {
@@ -311,14 +302,13 @@ void ScrollBar::ApplyConstraints()
     // Set indicator height according to the indicator's height policy
     if(mIndicatorHeightPolicy == Toolkit::ScrollBar::FIXED)
     {
-      mIndicator.SetProperty( Actor::Property::SIZE, Vector2( Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight) );
+      mIndicator.SetProperty(Actor::Property::SIZE, Vector2(Self().GetCurrentProperty<Vector3>(Actor::Property::SIZE).width, mIndicatorFixedHeight));
     }
     else
     {
-      mIndicatorSizeConstraint = Constraint::New<Vector3>( mIndicator, Actor::Property::SIZE,
-                                                           IndicatorSizeConstraint( mIndicatorMinimumHeight, mIndicatorStartPadding + mIndicatorEndPadding ) );
-      mIndicatorSizeConstraint.AddSource( ParentSource( Actor::Property::SIZE ) );
-      mIndicatorSizeConstraint.AddSource( Source( scrollableHandle, mPropertyScrollContentSize ) );
+      mIndicatorSizeConstraint = Constraint::New<Vector3>(mIndicator, Actor::Property::SIZE, IndicatorSizeConstraint(mIndicatorMinimumHeight, mIndicatorStartPadding + mIndicatorEndPadding));
+      mIndicatorSizeConstraint.AddSource(ParentSource(Actor::Property::SIZE));
+      mIndicatorSizeConstraint.AddSource(Source(scrollableHandle, mPropertyScrollContentSize));
       mIndicatorSizeConstraint.Apply();
     }
 
@@ -327,32 +317,31 @@ void ScrollBar::ApplyConstraints()
       mIndicatorPositionConstraint.Remove();
     }
 
-    mIndicatorPositionConstraint = Constraint::New<Vector3>( mIndicator, Actor::Property::POSITION,
-                                                             IndicatorPositionConstraint( mIndicatorStartPadding, mIndicatorEndPadding ) );
-    mIndicatorPositionConstraint.AddSource( LocalSource( Actor::Property::SIZE ) );
-    mIndicatorPositionConstraint.AddSource( ParentSource( Actor::Property::SIZE ) );
-    mIndicatorPositionConstraint.AddSource( Source( scrollableHandle, mPropertyScrollPosition ) );
-    mIndicatorPositionConstraint.AddSource( Source( scrollableHandle, mPropertyMinScrollPosition ) );
-    mIndicatorPositionConstraint.AddSource( Source( scrollableHandle, mPropertyMaxScrollPosition ) );
+    mIndicatorPositionConstraint = Constraint::New<Vector3>(mIndicator, Actor::Property::POSITION, IndicatorPositionConstraint(mIndicatorStartPadding, mIndicatorEndPadding));
+    mIndicatorPositionConstraint.AddSource(LocalSource(Actor::Property::SIZE));
+    mIndicatorPositionConstraint.AddSource(ParentSource(Actor::Property::SIZE));
+    mIndicatorPositionConstraint.AddSource(Source(scrollableHandle, mPropertyScrollPosition));
+    mIndicatorPositionConstraint.AddSource(Source(scrollableHandle, mPropertyMinScrollPosition));
+    mIndicatorPositionConstraint.AddSource(Source(scrollableHandle, mPropertyMaxScrollPosition));
     mIndicatorPositionConstraint.Apply();
   }
 }
 
-void ScrollBar::SetScrollPositionIntervals( const Dali::Vector<float>& positions )
+void ScrollBar::SetScrollPositionIntervals(const Dali::Vector<float>& positions)
 {
   mScrollPositionIntervals = positions;
 
   Handle scrollableHandle = mScrollableObject.GetHandle();
 
-  if( scrollableHandle )
+  if(scrollableHandle)
   {
-    if( mPositionNotification )
+    if(mPositionNotification)
     {
       scrollableHandle.RemovePropertyNotification(mPositionNotification);
     }
 
-    mPositionNotification = scrollableHandle.AddPropertyNotification( mPropertyScrollPosition, VariableStepCondition(mScrollPositionIntervals) );
-    mPositionNotification.NotifySignal().Connect( this, &ScrollBar::OnScrollPositionIntervalReached );
+    mPositionNotification = scrollableHandle.AddPropertyNotification(mPropertyScrollPosition, VariableStepCondition(mScrollPositionIntervals));
+    mPositionNotification.NotifySignal().Connect(this, &ScrollBar::OnScrollPositionIntervalReached);
   }
 }
 
@@ -367,8 +356,8 @@ void ScrollBar::OnScrollPositionIntervalReached(PropertyNotification& source)
   Handle scrollableHandle = mScrollableObject.GetHandle();
   if(scrollableHandle)
   {
-    mScrollPositionIntervalReachedSignal.Emit( scrollableHandle.GetCurrentProperty< float >( mPropertyScrollPosition ) );
-    if (Self() == Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor())
+    mScrollPositionIntervalReachedSignal.Emit(scrollableHandle.GetCurrentProperty<float>(mPropertyScrollPosition));
+    if(Self() == Dali::Accessibility::Accessible::GetCurrentlyHighlightedActor())
     {
       Control::Impl::GetAccessibilityObject(Self())->Emit(Dali::Accessibility::ObjectPropertyChangeEvent::VALUE);
     }
@@ -384,22 +373,22 @@ void ScrollBar::ShowIndicator()
     mAnimation.Reset();
   }
 
-  if( mIndicatorFirstShow )
+  if(mIndicatorFirstShow)
   {
     // Preserve the alpha value from the stylesheet
-    mIndicatorShowAlpha = Self().GetCurrentProperty< Vector4 >( Actor::Property::COLOR ).a;
+    mIndicatorShowAlpha = Self().GetCurrentProperty<Vector4>(Actor::Property::COLOR).a;
     mIndicatorFirstShow = false;
   }
 
   if(mIndicatorShowDuration > 0.0f)
   {
-    mAnimation = Animation::New( mIndicatorShowDuration );
-    mAnimation.AnimateTo( Property( mIndicator, Actor::Property::COLOR_ALPHA ), mIndicatorShowAlpha, AlphaFunction::EASE_IN );
+    mAnimation = Animation::New(mIndicatorShowDuration);
+    mAnimation.AnimateTo(Property(mIndicator, Actor::Property::COLOR_ALPHA), mIndicatorShowAlpha, AlphaFunction::EASE_IN);
     mAnimation.Play();
   }
   else
   {
-    mIndicator.SetProperty( Actor::Property::OPACITY,mIndicatorShowAlpha);
+    mIndicator.SetProperty(Actor::Property::OPACITY, mIndicatorShowAlpha);
   }
 }
 
@@ -414,13 +403,13 @@ void ScrollBar::HideIndicator()
 
   if(mIndicatorHideDuration > 0.0f)
   {
-    mAnimation = Animation::New( mIndicatorHideDuration );
-    mAnimation.AnimateTo( Property( mIndicator, Actor::Property::COLOR_ALPHA ), 0.0f, AlphaFunction::EASE_IN );
+    mAnimation = Animation::New(mIndicatorHideDuration);
+    mAnimation.AnimateTo(Property(mIndicator, Actor::Property::COLOR_ALPHA), 0.0f, AlphaFunction::EASE_IN);
     mAnimation.Play();
   }
   else
   {
-    mIndicator.SetProperty( Actor::Property::OPACITY,0.0f);
+    mIndicator.SetProperty(Actor::Property::OPACITY, 0.0f);
   }
 }
 
@@ -433,18 +422,22 @@ void ScrollBar::ShowTransientIndicator()
     mAnimation.Reset();
   }
 
-  mAnimation = Animation::New( mIndicatorShowDuration + mTransientIndicatorDuration + mIndicatorHideDuration );
+  mAnimation = Animation::New(mIndicatorShowDuration + mTransientIndicatorDuration + mIndicatorHideDuration);
   if(mIndicatorShowDuration > 0.0f)
   {
-    mAnimation.AnimateTo( Property( mIndicator, Actor::Property::COLOR_ALPHA ),
-                          mIndicatorShowAlpha, AlphaFunction::EASE_IN, TimePeriod(0, mIndicatorShowDuration) );
+    mAnimation.AnimateTo(Property(mIndicator, Actor::Property::COLOR_ALPHA),
+                         mIndicatorShowAlpha,
+                         AlphaFunction::EASE_IN,
+                         TimePeriod(0, mIndicatorShowDuration));
   }
   else
   {
-    mIndicator.SetProperty( Actor::Property::OPACITY,mIndicatorShowAlpha);
+    mIndicator.SetProperty(Actor::Property::OPACITY, mIndicatorShowAlpha);
   }
-  mAnimation.AnimateTo( Property( mIndicator, Actor::Property::COLOR_ALPHA ),
-                        0.0f, AlphaFunction::EASE_IN, TimePeriod((mIndicatorShowDuration + mTransientIndicatorDuration), mIndicatorHideDuration) );
+  mAnimation.AnimateTo(Property(mIndicator, Actor::Property::COLOR_ALPHA),
+                       0.0f,
+                       AlphaFunction::EASE_IN,
+                       TimePeriod((mIndicatorShowDuration + mTransientIndicatorDuration), mIndicatorHideDuration));
   mAnimation.Play();
 }
 
@@ -452,7 +445,7 @@ bool ScrollBar::OnPanGestureProcessTick()
 {
   // Update the scroll position property.
   Handle scrollableHandle = mScrollableObject.GetHandle();
-  if( scrollableHandle )
+  if(scrollableHandle)
   {
     scrollableHandle.SetProperty(mPropertyScrollPosition, mCurrentScrollPosition);
   }
@@ -460,7 +453,7 @@ bool ScrollBar::OnPanGestureProcessTick()
   return true;
 }
 
-void ScrollBar::OnPan( const PanGesture& gesture )
+void ScrollBar::OnPan(const PanGesture& gesture)
 {
   Handle scrollableHandle = mScrollableObject.GetHandle();
 
@@ -472,18 +465,18 @@ void ScrollBar::OnPan( const PanGesture& gesture )
     {
       case Dali::GestureState::STARTED:
       {
-        if( !mPanProcessTimer )
+        if(!mPanProcessTimer)
         {
           // Make sure the pan gesture is only being processed once per frame.
-          mPanProcessTimer = Timer::New( DEFAULT_PAN_GESTURE_PROCESS_TIME );
-          mPanProcessTimer.TickSignal().Connect( this, &ScrollBar::OnPanGestureProcessTick );
+          mPanProcessTimer = Timer::New(DEFAULT_PAN_GESTURE_PROCESS_TIME);
+          mPanProcessTimer.TickSignal().Connect(this, &ScrollBar::OnPanGestureProcessTick);
           mPanProcessTimer.Start();
         }
 
         ShowIndicator();
-        mScrollStart = scrollableHandle.GetCurrentProperty< float >( mPropertyScrollPosition );
+        mScrollStart         = scrollableHandle.GetCurrentProperty<float>(mPropertyScrollPosition);
         mGestureDisplacement = Vector2::ZERO;
-        mIsPanning = true;
+        mIsPanning           = true;
 
         break;
       }
@@ -491,15 +484,15 @@ void ScrollBar::OnPan( const PanGesture& gesture )
       {
         mGestureDisplacement += gesture.GetDisplacement();
 
-        float minScrollPosition = scrollableHandle.GetCurrentProperty<float>( mPropertyMinScrollPosition );
-        float maxScrollPosition = scrollableHandle.GetCurrentProperty<float>( mPropertyMaxScrollPosition );
+        float minScrollPosition = scrollableHandle.GetCurrentProperty<float>(mPropertyMinScrollPosition);
+        float maxScrollPosition = scrollableHandle.GetCurrentProperty<float>(mPropertyMaxScrollPosition);
 
         // The domain size is the internal range
-        float domainSize = maxScrollPosition - minScrollPosition;
-        float logicalSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y - ( mIndicator.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).y + mIndicatorStartPadding + mIndicatorEndPadding );
+        float domainSize  = maxScrollPosition - minScrollPosition;
+        float logicalSize = Self().GetCurrentProperty<Vector3>(Actor::Property::SIZE).y - (mIndicator.GetCurrentProperty<Vector3>(Actor::Property::SIZE).y + mIndicatorStartPadding + mIndicatorEndPadding);
 
-        mCurrentScrollPosition = mScrollStart - ( ( mGestureDisplacement.y * domainSize ) / logicalSize );
-        mCurrentScrollPosition = -std::min( maxScrollPosition, std::max( -mCurrentScrollPosition, minScrollPosition ) );
+        mCurrentScrollPosition = mScrollStart - ((mGestureDisplacement.y * domainSize) / logicalSize);
+        mCurrentScrollPosition = -std::min(maxScrollPosition, std::max(-mCurrentScrollPosition, minScrollPosition));
 
         break;
       }
@@ -507,11 +500,11 @@ void ScrollBar::OnPan( const PanGesture& gesture )
       {
         mIsPanning = false;
 
-        if( mPanProcessTimer )
+        if(mPanProcessTimer)
         {
           // Destroy the timer when pan gesture is finished.
           mPanProcessTimer.Stop();
-          mPanProcessTimer.TickSignal().Disconnect( this, &ScrollBar::OnPanGestureProcessTick );
+          mPanProcessTimer.TickSignal().Disconnect(this, &ScrollBar::OnPanGestureProcessTick);
           mPanProcessTimer.Reset();
         }
 
@@ -535,17 +528,17 @@ void ScrollBar::OnPan( const PanGesture& gesture )
   }
 }
 
-void ScrollBar::OnSizeSet( const Vector3& size )
+void ScrollBar::OnSizeSet(const Vector3& size)
 {
   if(mIndicatorHeightPolicy == Toolkit::ScrollBar::FIXED)
   {
-    mIndicator.SetProperty( Actor::Property::SIZE, Vector2( size.width, mIndicatorFixedHeight ) );
+    mIndicator.SetProperty(Actor::Property::SIZE, Vector2(size.width, mIndicatorFixedHeight));
   }
 
-  Control::OnSizeSet( size );
+  Control::OnSizeSet(size);
 }
 
-void ScrollBar::SetScrollDirection( Toolkit::ScrollBar::Direction direction )
+void ScrollBar::SetScrollDirection(Toolkit::ScrollBar::Direction direction)
 {
   mDirection = direction;
 }
@@ -555,9 +548,9 @@ Toolkit::ScrollBar::Direction ScrollBar::GetScrollDirection() const
   return mDirection;
 }
 
-void ScrollBar::SetIndicatorHeightPolicy( Toolkit::ScrollBar::IndicatorHeightPolicy policy )
+void ScrollBar::SetIndicatorHeightPolicy(Toolkit::ScrollBar::IndicatorHeightPolicy policy)
 {
-  if( policy != mIndicatorHeightPolicy )
+  if(policy != mIndicatorHeightPolicy)
   {
     mIndicatorHeightPolicy = policy;
     ApplyConstraints();
@@ -569,13 +562,13 @@ Toolkit::ScrollBar::IndicatorHeightPolicy ScrollBar::GetIndicatorHeightPolicy()
   return mIndicatorHeightPolicy;
 }
 
-void ScrollBar::SetIndicatorFixedHeight( float height )
+void ScrollBar::SetIndicatorFixedHeight(float height)
 {
   mIndicatorFixedHeight = height;
 
   if(mIndicatorHeightPolicy == Toolkit::ScrollBar::FIXED)
   {
-    mIndicator.SetProperty( Actor::Property::SIZE, Vector2( Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).width, mIndicatorFixedHeight) );
+    mIndicator.SetProperty(Actor::Property::SIZE, Vector2(Self().GetCurrentProperty<Vector3>(Actor::Property::SIZE).width, mIndicatorFixedHeight));
   }
 }
 
@@ -584,7 +577,7 @@ float ScrollBar::GetIndicatorFixedHeight() const
   return mIndicatorFixedHeight;
 }
 
-void ScrollBar::SetIndicatorShowDuration( float durationSeconds )
+void ScrollBar::SetIndicatorShowDuration(float durationSeconds)
 {
   mIndicatorShowDuration = durationSeconds;
 }
@@ -594,7 +587,7 @@ float ScrollBar::GetIndicatorShowDuration() const
   return mIndicatorShowDuration;
 }
 
-void ScrollBar::SetIndicatorHideDuration( float durationSeconds )
+void ScrollBar::SetIndicatorHideDuration(float durationSeconds)
 {
   mIndicatorHideDuration = durationSeconds;
 }
@@ -604,9 +597,9 @@ float ScrollBar::GetIndicatorHideDuration() const
   return mIndicatorHideDuration;
 }
 
-void ScrollBar::OnScrollDirectionPropertySet( Property::Value propertyValue )
+void ScrollBar::OnScrollDirectionPropertySet(Property::Value propertyValue)
 {
-  std::string directionName( propertyValue.Get<std::string>() );
+  std::string directionName(propertyValue.Get<std::string>());
   if(directionName == "VERTICAL")
   {
     SetScrollDirection(Toolkit::ScrollBar::VERTICAL);
@@ -617,13 +610,13 @@ void ScrollBar::OnScrollDirectionPropertySet( Property::Value propertyValue )
   }
   else
   {
-    DALI_ASSERT_ALWAYS( !"ScrollBar::OnScrollDirectionPropertySet(). Invalid Property value." );
+    DALI_ASSERT_ALWAYS(!"ScrollBar::OnScrollDirectionPropertySet(). Invalid Property value.");
   }
 }
 
-void ScrollBar::OnIndicatorHeightPolicyPropertySet( Property::Value propertyValue )
+void ScrollBar::OnIndicatorHeightPolicyPropertySet(Property::Value propertyValue)
 {
-  std::string policyName( propertyValue.Get<std::string>() );
+  std::string policyName(propertyValue.Get<std::string>());
   if(policyName == "VARIABLE")
   {
     SetIndicatorHeightPolicy(Toolkit::ScrollBar::VARIABLE);
@@ -634,24 +627,24 @@ void ScrollBar::OnIndicatorHeightPolicyPropertySet( Property::Value propertyValu
   }
   else
   {
-    DALI_ASSERT_ALWAYS( !"ScrollBar::OnIndicatorHeightPolicyPropertySet(). Invalid Property value." );
+    DALI_ASSERT_ALWAYS(!"ScrollBar::OnIndicatorHeightPolicyPropertySet(). Invalid Property value.");
   }
 }
 
-bool ScrollBar::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor )
+bool ScrollBar::DoConnectSignal(BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor)
 {
-  Dali::BaseHandle handle( object );
+  Dali::BaseHandle handle(object);
 
-  bool connected( true );
-  Toolkit::ScrollBar scrollBar = Toolkit::ScrollBar::DownCast( handle );
+  bool               connected(true);
+  Toolkit::ScrollBar scrollBar = Toolkit::ScrollBar::DownCast(handle);
 
-  if( 0 == strcmp( signalName.c_str(), PAN_FINISHED_SIGNAL ) )
+  if(0 == strcmp(signalName.c_str(), PAN_FINISHED_SIGNAL))
   {
-    scrollBar.PanFinishedSignal().Connect( tracker, functor );
+    scrollBar.PanFinishedSignal().Connect(tracker, functor);
   }
-  else if( 0 == strcmp( signalName.c_str(), SCROLL_POSITION_INTERVAL_REACHED_SIGNAL ) )
+  else if(0 == strcmp(signalName.c_str(), SCROLL_POSITION_INTERVAL_REACHED_SIGNAL))
   {
-    scrollBar.ScrollPositionIntervalReachedSignal().Connect( tracker, functor );
+    scrollBar.ScrollPositionIntervalReachedSignal().Connect(tracker, functor);
   }
   else
   {
@@ -662,23 +655,23 @@ bool ScrollBar::DoConnectSignal( BaseObject* object, ConnectionTrackerInterface*
   return connected;
 }
 
-void ScrollBar::SetProperty( BaseObject* object, Property::Index index, const Property::Value& value )
+void ScrollBar::SetProperty(BaseObject* object, Property::Index index, const Property::Value& value)
 {
-  Toolkit::ScrollBar scrollBar = Toolkit::ScrollBar::DownCast( Dali::BaseHandle( object ) );
+  Toolkit::ScrollBar scrollBar = Toolkit::ScrollBar::DownCast(Dali::BaseHandle(object));
 
-  if( scrollBar )
+  if(scrollBar)
   {
-    ScrollBar& scrollBarImpl( GetImpl( scrollBar ) );
-    switch( index )
+    ScrollBar& scrollBarImpl(GetImpl(scrollBar));
+    switch(index)
     {
       case Toolkit::ScrollBar::Property::SCROLL_DIRECTION:
       {
-        scrollBarImpl.OnScrollDirectionPropertySet( value );
+        scrollBarImpl.OnScrollDirectionPropertySet(value);
         break;
       }
       case Toolkit::ScrollBar::Property::INDICATOR_HEIGHT_POLICY:
       {
-        scrollBarImpl.OnIndicatorHeightPolicyPropertySet( value );
+        scrollBarImpl.OnIndicatorHeightPolicyPropertySet(value);
         break;
       }
       case Toolkit::ScrollBar::Property::INDICATOR_FIXED_HEIGHT:
@@ -699,14 +692,14 @@ void ScrollBar::SetProperty( BaseObject* object, Property::Index index, const Pr
       case Toolkit::ScrollBar::Property::SCROLL_POSITION_INTERVALS:
       {
         const Property::Array* array = value.GetArray();
-        if( array )
+        if(array)
         {
           Dali::Vector<float> positions;
-          size_t positionCount = array->Count();
-          positions.Resize( positionCount );
-          for( size_t i = 0; i != positionCount; ++i )
+          size_t              positionCount = array->Count();
+          positions.Resize(positionCount);
+          for(size_t i = 0; i != positionCount; ++i)
           {
-            array->GetElementAt( i ).Get( positions[i] );
+            array->GetElementAt(i).Get(positions[i]);
           }
 
           scrollBarImpl.SetScrollPositionIntervals(positions);
@@ -740,25 +733,25 @@ void ScrollBar::SetProperty( BaseObject* object, Property::Index index, const Pr
   }
 }
 
-Property::Value ScrollBar::GetProperty( BaseObject* object, Property::Index index )
+Property::Value ScrollBar::GetProperty(BaseObject* object, Property::Index index)
 {
   Property::Value value;
 
-  Toolkit::ScrollBar scrollBar = Toolkit::ScrollBar::DownCast( Dali::BaseHandle( object ) );
+  Toolkit::ScrollBar scrollBar = Toolkit::ScrollBar::DownCast(Dali::BaseHandle(object));
 
-  if( scrollBar )
+  if(scrollBar)
   {
-    ScrollBar& scrollBarImpl( GetImpl( scrollBar ) );
-    switch( index )
+    ScrollBar& scrollBarImpl(GetImpl(scrollBar));
+    switch(index)
     {
       case Toolkit::ScrollBar::Property::SCROLL_DIRECTION:
       {
-        value = SCROLL_DIRECTION_NAME[ scrollBarImpl.GetScrollDirection() ];
+        value = SCROLL_DIRECTION_NAME[scrollBarImpl.GetScrollDirection()];
         break;
       }
       case Toolkit::ScrollBar::Property::INDICATOR_HEIGHT_POLICY:
       {
-        value = INDICATOR_HEIGHT_POLICY_NAME[ scrollBarImpl.GetIndicatorHeightPolicy() ];
+        value = INDICATOR_HEIGHT_POLICY_NAME[scrollBarImpl.GetIndicatorHeightPolicy()];
         break;
       }
       case Toolkit::ScrollBar::Property::INDICATOR_FIXED_HEIGHT:
@@ -778,17 +771,17 @@ Property::Value ScrollBar::GetProperty( BaseObject* object, Property::Index inde
       }
       case Toolkit::ScrollBar::Property::SCROLL_POSITION_INTERVALS:
       {
-        Property::Value tempValue( Property::ARRAY );
+        Property::Value  tempValue(Property::ARRAY);
         Property::Array* array = tempValue.GetArray();
 
-        if( array )
+        if(array)
         {
           Dali::Vector<float> positions = scrollBarImpl.GetScrollPositionIntervals();
-          size_t positionCount( positions.Count() );
+          size_t              positionCount(positions.Count());
 
-          for( size_t i( 0 ); i != positionCount; ++i )
+          for(size_t i(0); i != positionCount; ++i)
           {
-            array->PushBack( positions[i] );
+            array->PushBack(positions[i]);
           }
 
           value = tempValue;
@@ -820,31 +813,31 @@ Property::Value ScrollBar::GetProperty( BaseObject* object, Property::Index inde
   return value;
 }
 
-bool ScrollBar::DoAction( BaseObject* object, const std::string& actionName, const Property::Map& attributes )
+bool ScrollBar::DoAction(BaseObject* object, const std::string& actionName, const Property::Map& attributes)
 {
   bool ret = false;
 
-  Dali::BaseHandle handle( object );
+  Dali::BaseHandle handle(object);
 
-  Toolkit::ScrollBar scrollBar = Toolkit::ScrollBar::DownCast( handle );
+  Toolkit::ScrollBar scrollBar = Toolkit::ScrollBar::DownCast(handle);
 
-  DALI_ASSERT_DEBUG( scrollBar );
+  DALI_ASSERT_DEBUG(scrollBar);
 
-  if( scrollBar )
+  if(scrollBar)
   {
-    if( 0 == strcmp( actionName.c_str(), ACTION_SHOW_INDICATOR ) )
+    if(0 == strcmp(actionName.c_str(), ACTION_SHOW_INDICATOR))
     {
-      GetImpl( scrollBar ).ShowIndicator();
+      GetImpl(scrollBar).ShowIndicator();
       ret = true;
     }
-    else if( 0 == strcmp( actionName.c_str(), ACTION_HIDE_INDICATOR ) )
+    else if(0 == strcmp(actionName.c_str(), ACTION_HIDE_INDICATOR))
     {
-      GetImpl( scrollBar ).HideIndicator();
+      GetImpl(scrollBar).HideIndicator();
       ret = true;
     }
-    else if( 0 == strcmp( actionName.c_str(), ACTION_SHOW_TRANSIENT_INDICATOR ) )
+    else if(0 == strcmp(actionName.c_str(), ACTION_SHOW_TRANSIENT_INDICATOR))
     {
-      GetImpl( scrollBar ).ShowTransientIndicator();
+      GetImpl(scrollBar).ShowTransientIndicator();
       ret = true;
     }
   }
@@ -855,10 +848,10 @@ bool ScrollBar::DoAction( BaseObject* object, const std::string& actionName, con
 Toolkit::ScrollBar ScrollBar::New(Toolkit::ScrollBar::Direction direction)
 {
   // Create the implementation, temporarily owned by this handle on stack
-  IntrusivePtr< ScrollBar > impl = new ScrollBar(direction);
+  IntrusivePtr<ScrollBar> impl = new ScrollBar(direction);
 
   // Pass ownership to CustomActor handle
-  Toolkit::ScrollBar handle( *impl );
+  Toolkit::ScrollBar handle(*impl);
 
   // Second-phase init of the implementation
   // This can only be done after the CustomActor connection has been made...
@@ -869,47 +862,50 @@ Toolkit::ScrollBar ScrollBar::New(Toolkit::ScrollBar::Direction direction)
 
 double ScrollBar::AccessibleImpl::GetMinimum()
 {
-  auto p = Toolkit::ScrollBar::DownCast( self );
-  Handle scrollableHandle = GetImpl( p ).mScrollableObject.GetHandle();
-  return scrollableHandle ? scrollableHandle.GetCurrentProperty< float >( GetImpl( p ).mPropertyMinScrollPosition ) : 0.0f;
+  auto   p                = Toolkit::ScrollBar::DownCast(self);
+  Handle scrollableHandle = GetImpl(p).mScrollableObject.GetHandle();
+  return scrollableHandle ? scrollableHandle.GetCurrentProperty<float>(GetImpl(p).mPropertyMinScrollPosition) : 0.0f;
 }
 
 double ScrollBar::AccessibleImpl::GetCurrent()
 {
-  auto p = Toolkit::ScrollBar::DownCast( self );
-  Handle scrollableHandle = GetImpl( p ).mScrollableObject.GetHandle();
-  return scrollableHandle ? scrollableHandle.GetCurrentProperty< float >( GetImpl( p ).mPropertyScrollPosition ) : 0.0f;
+  auto   p                = Toolkit::ScrollBar::DownCast(self);
+  Handle scrollableHandle = GetImpl(p).mScrollableObject.GetHandle();
+  return scrollableHandle ? scrollableHandle.GetCurrentProperty<float>(GetImpl(p).mPropertyScrollPosition) : 0.0f;
 }
 
 double ScrollBar::AccessibleImpl::GetMaximum()
 {
-  auto p = Toolkit::ScrollBar::DownCast( self );
-  Handle scrollableHandle = GetImpl( p ).mScrollableObject.GetHandle();
-  return scrollableHandle ? scrollableHandle.GetCurrentProperty< float >( GetImpl( p ).mPropertyMaxScrollPosition ) : 1.0f;
+  auto   p                = Toolkit::ScrollBar::DownCast(self);
+  Handle scrollableHandle = GetImpl(p).mScrollableObject.GetHandle();
+  return scrollableHandle ? scrollableHandle.GetCurrentProperty<float>(GetImpl(p).mPropertyMaxScrollPosition) : 1.0f;
 }
 
-bool ScrollBar::AccessibleImpl::SetCurrent( double current )
+bool ScrollBar::AccessibleImpl::SetCurrent(double current)
 {
-  if( current < GetMinimum() || current > GetMaximum() )
+  if(current < GetMinimum() || current > GetMaximum())
     return false;
 
   auto value_before = GetCurrent();
 
-  auto p = Toolkit::ScrollBar::DownCast( self );
-  Handle scrollableHandle = GetImpl( p ).mScrollableObject.GetHandle();
-  if( !scrollableHandle )
+  auto   p                = Toolkit::ScrollBar::DownCast(self);
+  Handle scrollableHandle = GetImpl(p).mScrollableObject.GetHandle();
+  if(!scrollableHandle)
     return false;
-  scrollableHandle.SetProperty( GetImpl( p ).mPropertyScrollPosition, static_cast< float >( current ) );
+  scrollableHandle.SetProperty(GetImpl(p).mPropertyScrollPosition, static_cast<float>(current));
 
   auto value_after = GetCurrent();
 
-  if( ( current != value_before ) && ( value_before == value_after ) )
+  if((current != value_before) && (value_before == value_after))
     return false;
 
   return true;
 }
 
-double ScrollBar::AccessibleImpl::GetMinimumIncrement() { return 1.0; }
+double ScrollBar::AccessibleImpl::GetMinimumIncrement()
+{
+  return 1.0;
+}
 
 } // namespace Internal