projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Add GetSurfaceType() in TestRenderSurface" into devel/master
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
public-api
/
controls
/
scrollable
/
scroll-view
/
scroll-view.cpp
diff --git
a/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp
b/dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp
index
158acfa
..
eadaa49
100644
(file)
--- a/
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp
+++ b/
dali-toolkit/public-api/controls/scrollable/scroll-view/scroll-view.cpp
@@
-190,7
+190,7
@@
FixedRuler::FixedRuler(float spacing)
{
if(fabsf(mSpacing) <= Math::MACHINE_EPSILON_1)
{
{
if(fabsf(mSpacing) <= Math::MACHINE_EPSILON_1)
{
- DALI_LOG_ERROR( "Page spacing too small (%f).", double(spacing) );
+ DALI_LOG_ERROR( "Page spacing too small (%f).
\n
", double(spacing) );
mSpacing = spacing >= 0.0f ? Math::MACHINE_EPSILON_1 : -Math::MACHINE_EPSILON_1;
}
mType = Fixed;
mSpacing = spacing >= 0.0f ? Math::MACHINE_EPSILON_1 : -Math::MACHINE_EPSILON_1;
}
mType = Fixed;
@@
-248,7
+248,7
@@
unsigned int FixedRuler::GetPageFromPosition(float position, bool wrap) const
{
position = WrapInDomain(position, mDomain.min, mDomain.max);
}
{
position = WrapInDomain(position, mDomain.min, mDomain.max);
}
- page =
floor((position - mDomain.min) / mSpacing + 0.5f
);
+ page =
std::max(static_cast<double>(0.0f), floor((position - mDomain.min) / mSpacing + 0.5f)
);
if(wrap)
{
if(wrap)
{
@@
-257,7
+257,7
@@
unsigned int FixedRuler::GetPageFromPosition(float position, bool wrap) const
if(pagesPerVolume < 1u)
{
pagesPerVolume = 1u;
if(pagesPerVolume < 1u)
{
pagesPerVolume = 1u;
- DALI_LOG_ERROR("Ruler domain(%f) is smaller than its spacing(%f).", mDomain.GetSize() * 1.0, mSpacing * 1.0 );
+ DALI_LOG_ERROR("Ruler domain(%f) is smaller than its spacing(%f).
\n
", mDomain.GetSize() * 1.0, mSpacing * 1.0 );
}
page %= pagesPerVolume;
}
}
page %= pagesPerVolume;
}
@@
-486,14
+486,14
@@
void ScrollView::SetMaxFlickSpeed(float speed)
GetImpl(*this).SetMaxFlickSpeed(speed);
}
GetImpl(*this).SetMaxFlickSpeed(speed);
}
-Vector2 ScrollView::Get
Mouse
WheelScrollDistanceStep() const
+Vector2 ScrollView::GetWheelScrollDistanceStep() const
{
{
- return GetImpl(*this).Get
Mouse
WheelScrollDistanceStep();
+ return GetImpl(*this).GetWheelScrollDistanceStep();
}
}
-void ScrollView::Set
Mouse
WheelScrollDistanceStep(Vector2 step)
+void ScrollView::SetWheelScrollDistanceStep(Vector2 step)
{
{
- GetImpl(*this).Set
Mouse
WheelScrollDistanceStep(step);
+ GetImpl(*this).SetWheelScrollDistanceStep(step);
}
Vector2 ScrollView::GetCurrentScrollPosition() const
}
Vector2 ScrollView::GetCurrentScrollPosition() const
@@
-501,11
+501,6
@@
Vector2 ScrollView::GetCurrentScrollPosition() const
return GetImpl(*this).GetCurrentScrollPosition();
}
return GetImpl(*this).GetCurrentScrollPosition();
}
-void ScrollView::SetScrollPosition(const Vector2& position)
-{
- GetImpl(*this).SetScrollPosition(position);
-}
-
unsigned int ScrollView::GetCurrentPage() const
{
return GetImpl(*this).GetCurrentPage();
unsigned int ScrollView::GetCurrentPage() const
{
return GetImpl(*this).GetCurrentPage();