projects
/
platform
/
core
/
uifw
/
dali-demo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed some examples to use initializer list for Maps & Arrays
[platform/core/uifw/dali-demo.git]
/
examples
/
simple-layout
/
custom-layout-impl.cpp
diff --git
a/examples/simple-layout/custom-layout-impl.cpp
b/examples/simple-layout/custom-layout-impl.cpp
index
132c1fa
..
ecdb932
100644
(file)
--- a/
examples/simple-layout/custom-layout-impl.cpp
+++ b/
examples/simple-layout/custom-layout-impl.cpp
@@
-66,8
+66,7
@@
void CustomLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top,
LayoutLength childLeft( 0 );
// We want to vertically align the children to the middle
LayoutLength childLeft( 0 );
// We want to vertically align the children to the middle
- LayoutLength height = bottom - top;
- LayoutLength middle = height / 2;
+ LayoutLength middle = (bottom - top) / 2;
// Horizontally align the children to the middle of the space they are given too
LayoutLength width = right - left;
// Horizontally align the children to the middle of the space they are given too
LayoutLength width = right - left;
@@
-90,7
+89,7
@@
void CustomLayout::OnLayout( bool changed, LayoutLength left, LayoutLength top,
LayoutLength childWidth = childLayout->GetMeasuredWidth();
LayoutLength childHeight = childLayout->GetMeasuredHeight();
LayoutLength childWidth = childLayout->GetMeasuredWidth();
LayoutLength childHeight = childLayout->GetMeasuredHeight();
- childTop = middle -
(childHeight / 2)
;
+ childTop = middle -
childHeight / 2
;
LayoutLength left = childLeft + center - childWidth / 2;
LayoutLength left = childLeft + center - childWidth / 2;