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
Add support for new accessibility actions
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
controls
/
magnifier
/
magnifier-impl.cpp
diff --git
a/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp
b/dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp
index
fc6f71a
..
15de6ea
100644
(file)
--- a/
dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp
+++ b/
dali-toolkit/internal/controls/magnifier/magnifier-impl.cpp
@@
-123,7
+123,7
@@
Dali::Toolkit::Magnifier Magnifier::New()
}
Magnifier::Magnifier()
}
Magnifier::Magnifier()
-: Control(
REQUIRES_TOUCH_EVENTS
),
+: Control(
ControlBehaviour( REQUIRES_TOUCH_EVENTS )
),
mPropertySourcePosition(Property::INVALID_INDEX),
mDefaultCameraDistance(1000.f),
mActorSize(Vector3::ZERO),
mPropertySourcePosition(Property::INVALID_INDEX),
mDefaultCameraDistance(1000.f),
mActorSize(Vector3::ZERO),
@@
-247,11
+247,13
@@
void Magnifier::SetFrameVisibility(bool visible)
Image image = ResourceImage::New( DEFAULT_FRAME_IMAGE_PATH );
mFrame = ImageActor::New( image );
Image image = ResourceImage::New( DEFAULT_FRAME_IMAGE_PATH );
mFrame = ImageActor::New( image );
- mFrame.SetRelayoutEnabled( false );
mFrame.SetDrawMode(DrawMode::OVERLAY);
mFrame.SetStyle( ImageActor::STYLE_NINE_PATCH );
mFrame.SetPositionInheritanceMode(DONT_INHERIT_POSITION);
mFrame.SetInheritScale(true);
mFrame.SetDrawMode(DrawMode::OVERLAY);
mFrame.SetStyle( ImageActor::STYLE_NINE_PATCH );
mFrame.SetPositionInheritanceMode(DONT_INHERIT_POSITION);
mFrame.SetInheritScale(true);
+ mFrame.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::ALL_DIMENSIONS );
+ Vector3 sizeOffset(IMAGE_BORDER_INDENT*2.f - 2.f, IMAGE_BORDER_INDENT*2.f - 2.f, 0.0f);
+ mFrame.SetSizeModeFactor( sizeOffset );
Constraint constraint = Constraint::New<Vector3>( mFrame, Actor::Property::POSITION, EqualToConstraint() );
constraint.AddSource( ParentSource( Actor::Property::WORLD_POSITION ) );
Constraint constraint = Constraint::New<Vector3>( mFrame, Actor::Property::POSITION, EqualToConstraint() );
constraint.AddSource( ParentSource( Actor::Property::WORLD_POSITION ) );
@@
-259,9
+261,6
@@
void Magnifier::SetFrameVisibility(bool visible)
mFrame.SetNinePatchBorder( Vector4::ONE * IMAGE_BORDER_INDENT );
self.Add(mFrame);
mFrame.SetNinePatchBorder( Vector4::ONE * IMAGE_BORDER_INDENT );
self.Add(mFrame);
-
- Vector3 sizeOffset(IMAGE_BORDER_INDENT*2.f - 2.f, IMAGE_BORDER_INDENT*2.f - 2.f, 0.0f);
- mFrame.SetSize(mActorSize + sizeOffset);
}
else if(!visible && mFrame)
{
}
else if(!visible && mFrame)
{
@@
-269,14
+268,8
@@
void Magnifier::SetFrameVisibility(bool visible)
}
}
}
}
-void Magnifier::On
Control
SizeSet(const Vector3& targetSize)
+void Magnifier::OnSizeSet(const Vector3& targetSize)
{
{
- if( mFrame )
- {
- Vector3 sizeOffset(IMAGE_BORDER_INDENT*2.f - 2.f, IMAGE_BORDER_INDENT*2.f - 2.f, 0.0f);
- mFrame.SetSize(targetSize + sizeOffset);
- }
-
// TODO: Once Camera/CameraActor properties function as proper animatable properties
// this code can disappear.
// whenever the size of the magnifier changes, the field of view needs to change
// TODO: Once Camera/CameraActor properties function as proper animatable properties
// this code can disappear.
// whenever the size of the magnifier changes, the field of view needs to change