int UtcDaliToolkitTextSelectionToolBarP(void)
{
-
// Creates Toolbar, adds 2 options and a divider then resizes divider
ToolkitTestApplication application;
DALI_TEST_CHECK( toolbar );
END_TEST;
}
+
+int UtcDaliToolkitTextSelectionToolBarScrollBarP(void)
+{
+ // Creates Toolbar, adds 2 options and a divider then resizes divider
+ ToolkitTestApplication application;
+
+ TextSelectionToolbar toolbar = TextSelectionToolbar::New();
+
+ toolbar.SetProperty( Toolkit::TextSelectionToolbar::Property::MAX_SIZE, Size( 100.0f, 60.0f) );
+
+ Toolkit::PushButton option = Toolkit::PushButton::New();
+ option.SetName( "test-option" );
+ option.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
+ toolbar.AddOption( option );
+
+ // Add a scroll-bar
+ toolbar.SetProperty( Toolkit::TextSelectionToolbar::Property::ENABLE_SCROLL_BAR, true );
+
+ bool enabled = toolbar.GetProperty<bool>( Toolkit::TextSelectionToolbar::Property::ENABLE_SCROLL_BAR );
+ DALI_TEST_CHECK( enabled );
+
+ DALI_TEST_CHECK( toolbar );
+ END_TEST;
+}
}
mIndicator = indicator;
- Toolkit::Control control = Toolkit::Control::DownCast( mIndicator );
- if( control )
- {
- control.SetStyleName( "ScrollBarIndicator" );
- }
-
mIndicatorFirstShow = true;
Self().Add( mIndicator );
{
if( ! mScrollBar )
{
+ Toolkit::ImageView indicator = Toolkit::ImageView::New();
+ indicator.SetParentOrigin( ParentOrigin::TOP_LEFT );
+ indicator.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ indicator.SetStyleName( "TextSelectionScrollIndicator" );
+
mScrollBar = Toolkit::ScrollBar::New( Toolkit::ScrollBar::Horizontal );
mScrollBar.SetName( "Text popup scroll bar" );
+ mScrollBar.SetStyleName( "TextSelectionScrollBar" );
mScrollBar.SetParentOrigin( ParentOrigin::BOTTOM_LEFT );
mScrollBar.SetAnchorPoint( AnchorPoint::TOP_LEFT );
mScrollBar.SetPosition( mScrollBarPadding.x, -mScrollBarPadding.y );
mScrollBar.SetResizePolicy( Dali::ResizePolicy::FIT_TO_CHILDREN, Dali::Dimension::WIDTH );
mScrollBar.SetOrientation( Quaternion( Radian( 1.5f * Math::PI ), Vector3::ZAXIS ) );
+ mScrollBar.SetScrollIndicator( indicator );
mScrollBar.GetPanGestureDetector().DetachAll();
mScrollView.Add( mScrollBar );
}
"overshootSize":[480.0,42.0]
}
},
+ "TextSelectionScrollBar":
+ {
+ "indicatorShowDuration":0.25,
+ "indicatorHideDuration":0.25
+ },
+ "TextSelectionScrollIndicator":
+ {
+ "image":
+ {
+ "visualType":"IMAGE",
+ "url":"{DALI_IMAGE_DIR}text_selection_scroll_indicator.9.png"
+ },
+ "color":[0.0,0.72,0.9,0.7]
+ },
"ScrollView":
{
"overshootEffectColor":"B018",
"ScrollBar":
{
"indicatorShowDuration":0.25,
- "indicatorHideDuration":0.25,
- "color":[0.0,0.72,0.9,0.7]
+ "indicatorHideDuration":0.25
+ },
+ "ScrollBarIndicator":
+ {
+ "image":
+ {
+ "visualType":"IMAGE",
+ "url":"{DALI_IMAGE_DIR}popup_scroll.9.png"
+ }
},
"TextEditor":
{