From: David Steele Date: Tue, 31 Mar 2015 14:44:46 +0000 (+0100) Subject: Merge branch 'tizen' into devel/new_mesh X-Git-Tag: dali_1.0.47~13^2~34 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=2ec164cd618f93ccafe17b1d0b8ff16401ed4aef Merge branch 'tizen' into devel/new_mesh Change-Id: I1df97f4ad515536413b587eb178a5645c31dbf3a --- 2ec164cd618f93ccafe17b1d0b8ff16401ed4aef diff --cc build/tizen/configure.ac index c1858ef,1e94aa3..5f027e6 --- a/build/tizen/configure.ac +++ b/build/tizen/configure.ac @@@ -46,12 -46,19 +46,19 @@@ AC_ARG_ENABLE([debug] [enable_debug=$enableval], [enable_debug=no]) - # option for JavaScript plugin - AC_ARG_ENABLE(javascript, + # option to build JavaScript plugin + # configure settings and output + # --enable-javascript // enable_javascript = yes + # --enable-javascript=yes // enable_javascript = yes + # --enable-javascript=no // enable_javascript = no + # --disable-javascript // enable_javascript = no + # no setting // enable_javascript = automatic ( enable if v8 present) + AC_ARG_ENABLE([javascript], [AC_HELP_STRING([--enable-javascript], - [Enable JavaScript plugin])] , - [enable_javascript=yes], + [Enable JavaScript plugin])] , + [enable_javascript=$enableval], - [enable_javascript=automatic]) - + [enable_javascript=no]) ++#TODO MESH_REWORK Change default back to automatic if test "x$enable_debug" = "xyes"; then DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDEBUG_ENABLED" diff --cc dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp index ede38ed,f9b3281..f27dc2f --- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp @@@ -1561,11 -1558,17 +1557,11 @@@ void ItemView::SetOvershootEnabled( boo if( enable ) { Property::Index effectOvershootPropertyIndex = Property::INVALID_INDEX; - mOvershootOverlay = CreateBouncingEffectActor( effectOvershootPropertyIndex ); - mOvershootOverlay.SetColor(mOvershootEffectColor); - mOvershootOverlay.SetParentOrigin(ParentOrigin::TOP_LEFT); - mOvershootOverlay.SetAnchorPoint(AnchorPoint::TOP_LEFT); - mOvershootOverlay.SetDrawMode(DrawMode::OVERLAY); - self.Add(mOvershootOverlay); - Constraint constraint = Constraint::New( Actor::Property::Size, + Constraint constraint = Constraint::New( Actor::Property::SIZE, ParentSource( mPropertyScrollDirection ), Source( mScrollPositionObject, ScrollConnector::OVERSHOOT ), - ParentSource( Actor::Property::Size ), + ParentSource( Actor::Property::SIZE ), OvershootOverlaySizeConstraint() ); mOvershootOverlay.ApplyConstraint(constraint); mOvershootOverlay.SetSize(OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.width, OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.height); diff --cc dali-toolkit/internal/controls/tool-bar/tool-bar-impl.cpp index b6554d1,73654a4..3bdc399 --- a/dali-toolkit/internal/controls/tool-bar/tool-bar-impl.cpp +++ b/dali-toolkit/internal/controls/tool-bar/tool-bar-impl.cpp @@@ -19,9 -19,10 +19,10 @@@ #include "tool-bar-impl.h" // EXTERNAL INCLUDES -#include +#include #include #include + #include // INTERNAL INCLUDES #include @@@ -73,12 -74,12 +74,12 @@@ void ToolBar::SetBackground( Actor back // ToolBar image background.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER ); background.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER ); - background.SetSize( mToolBarSize ); + background.SetPreferredSize( Vector2( mToolBarSize.width, mToolBarSize.height ) ); - RenderableActor renderableActor = RenderableActor::DownCast( background ); - if ( renderableActor ) + ImageActor imageActor = ImageActor::DownCast( background ); + if ( imageActor ) { - renderableActor.SetSortModifier( 1.f ); + imageActor.SetSortModifier( 1.f ); } Self().Add( background ); diff --cc dali-toolkit/public-api/controls/control-impl.cpp index 495d616,19f2619..3aa01ef --- a/dali-toolkit/public-api/controls/control-impl.cpp +++ b/dali-toolkit/public-api/controls/control-impl.cpp @@@ -24,8 -24,12 +24,10 @@@ #include #include #include -#include #include + #include #include + #include #include // INTERNAL INCLUDES @@@ -119,70 -94,36 +92,6 @@@ struct Backgroun } }; --/** - * Helper function to calculate a dimension given the policy of that dimension; the minimum & - * maximum values that dimension can be; and the allocated value for that dimension. - * - * @param[in] policy The size policy for that dimension. - * @param[in] minimum The minimum value that dimension can be. - * @param[in] maximum The maximum value that dimension can be. - * @param[in] allocated The value allocated for that dimension. - * - * @return The value that the dimension should be. - * - * @note This does not handle Control::Fixed policy. - * Creates a white coloured Mesh. -- */ - float Calculate( Control::SizePolicy policy, float minimum, float maximum, float allocated ) -Mesh CreateMesh() --{ - float size( allocated ); - - switch( policy ) - { - case Control::Fixed: - { - // Use allocated value - break; - } - - case Control::Minimum: - { - // Size is always at least the minimum. - size = std::max( allocated, minimum ); - break; - } - Vector3 white( Color::WHITE ); -- - case Control::Maximum: - { - // Size can grow but up to a maximum value. - size = std::min( allocated, maximum ); - break; - } - MeshData meshData; -- - case Control::Range: - { - // Size is at least the minimum and can grow up to the maximum - size = std::max( size, minimum ); - size = std::min( size, maximum ); - break; - } - // Create vertices with a white color (actual color is set by actor color) - MeshData::VertexContainer vertices(4); - vertices[ 0 ] = MeshData::Vertex( Vector3( -0.5f, -0.5f, 0.0f ), Vector2::ZERO, white ); - vertices[ 1 ] = MeshData::Vertex( Vector3( 0.5f, -0.5f, 0.0f ), Vector2::ZERO, white ); - vertices[ 2 ] = MeshData::Vertex( Vector3( -0.5f, 0.5f, 0.0f ), Vector2::ZERO, white ); - vertices[ 3 ] = MeshData::Vertex( Vector3( 0.5f, 0.5f, 0.0f ), Vector2::ZERO, white ); -- - case Control::Flexible: - { - // Size grows or shrinks with no limits. - size = allocated; - break; - } - // Specify all the faces - MeshData::FaceIndices faces; - faces.reserve( 6 ); // 2 triangles in Quad - faces.push_back( 0 ); faces.push_back( 3 ); faces.push_back( 1 ); - faces.push_back( 0 ); faces.push_back( 2 ); faces.push_back( 3 ); -- - default: - { - DALI_ASSERT_DEBUG( false && "This function was not intended to be used by any other policy." ); - break; - } - } - // Create the mesh data from the vertices and faces - meshData.SetMaterial( Material::New( "ControlMaterial" ) ); - meshData.SetVertices( vertices ); - meshData.SetFaceIndices( faces ); - meshData.SetHasColor( true ); -- - return size; - return Mesh::New( meshData ); --} - /** * Sets all the required properties for the background actor.