/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
#include <dali/public-api/events/touch-data.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/devel-api/scripting/scripting.h>
+#include <dali/devel-api/actors/actor-devel.h>
#include <dali/public-api/size-negotiation/relayout-container.h>
// INTERNAL INCLUDES
#include <dali-toolkit/public-api/controls/control-impl.h>
#include <dali-toolkit/public-api/controls/image-view/image-view.h>
#include <dali-toolkit/public-api/accessibility-manager/accessibility-manager.h>
+#include <dali-toolkit/public-api/visuals/color-visual-properties.h>
+#include <dali-toolkit/public-api/visuals/visual-properties.h>
#include <dali-toolkit/internal/focus-manager/keyboard-focus-manager-impl.h>
using namespace Dali;
const bool prevAlter = mAlterAddedChild;
mAlterAddedChild = false;
mPopupContainer.Add( mPopupBackgroundImage );
+ DevelActor::LowerToBottom(mPopupBackgroundImage);
mAlterAddedChild = prevAlter;
if( mTailImage )
Toolkit::Control Popup::CreateBacking()
{
Toolkit::Control backing = Control::New();
- backing.SetBackgroundColor( Vector4( mBackingColor.r, mBackingColor.g, mBackingColor.b, 1.0f ) );
+ backing.SetProperty( Toolkit::Control::Property::BACKGROUND,
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Toolkit::Visual::COLOR )
+ .Add( Toolkit::ColorVisual::Property::MIX_COLOR, Vector4( mBackingColor.r, mBackingColor.g, mBackingColor.b, 1.0f ) ) );
backing.SetName( "popupBacking" );
// Must always be positioned top-left of stage, regardless of parent.
backing.SetInheritPosition(false);
- backing.SetAnchorPoint( AnchorPoint::TOP_LEFT );
// Always the full size of the stage.
backing.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
void Popup::OnStageConnection( int depth )
{
- Control::OnStageConnection( depth );
-
mLayoutDirty = true;
RelayoutRequest();
+
+ Control::OnStageConnection( depth );
}
void Popup::OnChildAdd( Actor& child )
{
- Control::OnChildAdd( child );
-
// Re-parent any children added by user to the body layer.
if( mAlterAddedChild )
{
mLayoutDirty = true;
RelayoutRequest();
}
+
+ Control::OnChildAdd( child );
}
void Popup::LayoutContext( const Vector2& size )
nextFocusableActor = *( endIterator - 1 );
break;
}
+
+ default:
+ {
+ break;
+ }
}
if( !nextFocusableActor )