Stop using deprecated API from Popup and fix typo in Control 87/107587/1
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 28 Dec 2016 14:11:44 +0000 (14:11 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 28 Dec 2016 14:11:59 +0000 (14:11 +0000)
Change-Id: I8ff603aa1af813fa5e0bf614ebae815ddca7af6e

dali-toolkit/internal/controls/popup/popup-impl.cpp
dali-toolkit/public-api/controls/control.cpp

index 681d6b4..d12e273 100644 (file)
@@ -37,6 +37,8 @@
 #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;
@@ -908,7 +910,9 @@ Toolkit::Popup::ContextualMode Popup::GetContextualMode() const
 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.
index b83a652..415ffb6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2016 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.
@@ -109,7 +109,7 @@ const std::string& Control::GetStyleName() const
 
 void Control::SetBackgroundColor( const Vector4& color )
 {
-  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetBackgroundImage() is deprecated and will be removed from next release. use Property::BACKGROUND instead.\n" );
+  DALI_LOG_WARNING_NOFN("DEPRECATION WARNING: SetBackgroundColor() is deprecated and will be removed from next release. use Property::BACKGROUND instead.\n" );
 
   Internal::GetImplementation(*this).SetBackgroundColor( color );
 }