From 306ab4095235efd0289e9da4e3994f456cbda2aa Mon Sep 17 00:00:00 2001 From: Adeel Kazmi Date: Wed, 28 Dec 2016 14:11:44 +0000 Subject: [PATCH 1/1] Stop using deprecated API from Popup and fix typo in Control Change-Id: I8ff603aa1af813fa5e0bf614ebae815ddca7af6e --- dali-toolkit/internal/controls/popup/popup-impl.cpp | 6 +++++- dali-toolkit/public-api/controls/control.cpp | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dali-toolkit/internal/controls/popup/popup-impl.cpp b/dali-toolkit/internal/controls/popup/popup-impl.cpp index 681d6b4..d12e273 100644 --- a/dali-toolkit/internal/controls/popup/popup-impl.cpp +++ b/dali-toolkit/internal/controls/popup/popup-impl.cpp @@ -37,6 +37,8 @@ #include #include #include +#include +#include #include 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. diff --git a/dali-toolkit/public-api/controls/control.cpp b/dali-toolkit/public-api/controls/control.cpp index b83a652..415ffb6 100644 --- a/dali-toolkit/public-api/controls/control.cpp +++ b/dali-toolkit/public-api/controls/control.cpp @@ -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 ); } -- 2.7.4