-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+// CLASS HEADER
+#include <dali-toolkit/public-api/controls/scrollable/item-view/depth-layout.h>
+// EXTERNAL INCLUDES
#include <algorithm>
-
-#include <dali-toolkit/public-api/controls/scrollable/item-view/depth-layout.h>
+#include <dali/public-api/animation/animation.h>
using namespace Dali;
using namespace Dali::Toolkit;
-using namespace std;
namespace // unnamed namespace
{
float layoutWidth)
{
// Share the available space between margins & column spacings
- float availableSpace = max(0.0f, (layoutWidth - itemSize.width*numberOfColumns));
+ float availableSpace = std::max(0.0f, (layoutWidth - itemSize.width*numberOfColumns));
float leftMargin = availableSpace/numberOfColumns * 0.5f;
if (row < 0.0f)
{
- darkness = alpha = max(0.0f, 1.0f + row);
+ darkness = alpha = std::max(0.0f, 1.0f + row);
}
else
{
if (row > (mNumberOfRows-1.0f))
{
- alpha = max(0.0f, 1.0f - (row-(mNumberOfRows-1.0f)));
+ alpha = std::max(0.0f, 1.0f - (row-(mNumberOfRows-1.0f)));
}
}
float firstRow = -(firstItemPosition/mImpl->mNumberOfColumns);
float lastRow = firstRow + mImpl->mNumberOfRows * 0.5f;
- unsigned int firstItem = static_cast<unsigned int>(max(0.0f, firstRow * mImpl->mNumberOfColumns));
- unsigned int lastItem = static_cast<unsigned int>(max(0.0f, lastRow * mImpl->mNumberOfColumns));
+ unsigned int firstItem = static_cast<unsigned int>(std::max(0.0f, firstRow * mImpl->mNumberOfColumns));
+ unsigned int lastItem = static_cast<unsigned int>(std::max(0.0f, lastRow * mImpl->mNumberOfColumns));
return ItemRange(firstItem, lastItem+1);
}
{
if(animation)
{
- animation.Resize(actor, size);
+ animation.AnimateTo( Property( actor, Actor::Property::SIZE ), size );
}
}