#include <dali/public-api/animation/constraints.h>
#include <dali/public-api/object/type-registry.h>
#include <dali/public-api/size-negotiation/relayout-container.h>
-#include <dali/devel-api/object/type-registry-helper.h>
+#include <dali/public-api/object/type-registry-helper.h>
#include <dali/devel-api/rendering/renderer.h>
#include <dali/devel-api/scripting/scripting.h>
#include <dali/integration-api/debug.h>
DALI_TYPE_REGISTRATION_END()
-const char * const COLOR_RENDERER_COLOR_NAME("blendColor");
-
} // unnamed namespace
namespace Internal
: mControlImpl( controlImpl ),
mStyleName(""),
mBackgroundRenderer(),
+ mBackgroundColor(Color::TRANSPARENT),
mStartingPinchScale( NULL ),
mKeyEventSignal(),
mPinchGestureDetector(),
Control& mControlImpl;
std::string mStyleName;
Toolkit::ControlRenderer mBackgroundRenderer; ///< The control renderer to render the background
+ Vector4 mBackgroundColor; ///< The color of the background renderer
Vector3* mStartingPinchScale; ///< The scale when a pinch gesture starts, TODO: consider removing this
Toolkit::Control::KeyEventSignalType mKeyEventSignal;
Toolkit::Control::KeyInputFocusSignalType mKeyInputFocusGainedSignal;
void Control::SetBackgroundColor( const Vector4& color )
{
+ mImpl->mBackgroundColor = color;
+
Actor self( Self() );
Toolkit::RendererFactory factory = Toolkit::RendererFactory::Get();
factory.ResetRenderer( mImpl->mBackgroundRenderer, self, color );
Vector4 Control::GetBackgroundColor() const
{
- if( mImpl->mBackgroundRenderer && ( &typeid( GetImplementation(mImpl->mBackgroundRenderer) ) == &typeid( ColorRenderer ) ) )
- {
- Property::Map map;
- mImpl->mBackgroundRenderer.CreatePropertyMap( map );
- const Property::Value* colorValue = map.Find( COLOR_RENDERER_COLOR_NAME );
- Vector4 color;
- if( colorValue && colorValue->Get(color))
- {
- return color;
- }
- }
-
- return Color::TRANSPARENT;
+ return mImpl->mBackgroundColor;
}
void Control::SetBackground(const Property::Map& map)