/*
- * 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.
}
Popup::Popup()
-: Control( ControlBehaviour( REQUIRES_STYLE_CHANGE_SIGNALS ) ),
+: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
mTouchedOutsideSignal(),
mShowingSignal(),
mShownSignal(),
mPopupLayout = Toolkit::TableView::New( 3, 1 );
// Adds the default background image.
- SetPopupBackgroundImage( Toolkit::ImageView::New( ResourceImage::New( DEFAULT_BACKGROUND_IMAGE_PATH ) ) );
+ SetPopupBackgroundImage( Toolkit::ImageView::New( DEFAULT_BACKGROUND_IMAGE_PATH ) );
mPopupLayout.SetName( "popupLayoutTable" );
mPopupLayout.SetParentOrigin( ParentOrigin::CENTER );
// Update the state to indicate the current intent.
mDisplayState = Toolkit::Popup::SHOWING;
+ // We want the popup to have key input focus when it is displayed
+ SetKeyInputFocus();
+
// We are displaying so bring the popup layer to the front, and set it visible so it is rendered.
mLayer.RaiseToTop();
mLayer.SetVisible( true );
if( focusActor )
{
- SetKeyInputFocus();
keyboardFocusManager.SetCurrentFocusActor( focusActor );
}
}
if( !image.empty() )
{
// Adds the tail actor.
- Image tail = ResourceImage::New( image );
- mTailImage = Toolkit::ImageView::New( tail );
+ mTailImage = Toolkit::ImageView::New( image );
mTailImage.SetName( "tailImage" );
const Vector3 anchorPoint = AnchorPoint::BOTTOM_RIGHT - position;
mTailImage.SetParentOrigin( position );
std::string valueString;
if( value.Get( valueString ) )
{
- Image image = ResourceImage::New( valueString );
- if( image )
- {
- Toolkit::ImageView actor = Toolkit::ImageView::New( image );
- popupImpl.SetPopupBackgroundImage( actor );
- }
+ Toolkit::ImageView actor = Toolkit::ImageView::New( valueString );
+ popupImpl.SetPopupBackgroundImage( actor );
}
break;
}