/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
}
ScrollBar::ScrollBar(Toolkit::ScrollBar::Direction direction)
-: Control( ControlBehaviour( REQUIRES_TOUCH_EVENTS | REQUIRES_STYLE_CHANGE_SIGNALS ) ),
+: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
mIndicatorShowAlpha(1.0f),
mDirection(direction),
mScrollableObject(WeakHandleBase()),
// Don't allow empty handle
if( indicator )
{
+ // Remove current Indicator
+ if( mIndicator )
+ {
+ Self().Remove( mIndicator );
+ }
mIndicator = indicator;
mIndicatorFirstShow = true;
- Self().Add(mIndicator);
+ Self().Add( mIndicator );
- EnableGestureDetection(Gesture::Type(Gesture::Pan));
+ EnableGestureDetection( Gesture::Type( Gesture::Pan ) );
PanGestureDetector detector( GetPanGestureDetector() );
detector.DetachAll();
{
mIndicator.SetSize(size.width, mIndicatorFixedHeight);
}
+
+ Control::OnSizeSet( size );
}
void ScrollBar::SetScrollDirection( Toolkit::ScrollBar::Direction direction )