From cb123490953176fe061dc8757ac7fa6638450b39 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 4 Aug 2016 15:22:57 +0100 Subject: [PATCH] [3.0] Fixed Window::ShowIndicator(INVISIBLE) The indicator is still being drawn even when the window API is used to make it invisible. Changed the position of the content actor to offscreen if new content arrives after changing visibility. Change-Id: I724ac7a8c1f3985b55b1a21f59fcab387f2a7150 Signed-off-by: David Steele --- adaptors/ecore/common/ecore-indicator-impl.cpp | 50 +++++++++++++------------- adaptors/ecore/common/ecore-indicator-impl.h | 5 +++ 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/adaptors/ecore/common/ecore-indicator-impl.cpp b/adaptors/ecore/common/ecore-indicator-impl.cpp index fb60098..b33cd12 100644 --- a/adaptors/ecore/common/ecore-indicator-impl.cpp +++ b/adaptors/ecore/common/ecore-indicator-impl.cpp @@ -666,6 +666,10 @@ void Indicator::SetVisible( Dali::Window::IndicatorVisibleMode visibleMode, bool ShowIndicator( HIDE_NOW ); } } + else + { + mIsShowing = false; + } } } @@ -951,19 +955,7 @@ void Indicator::LoadSharedImage( Ecore_Ipc_Event_Server_Data *epcEvent ) } CreateNewImage( n ); - - if( CheckVisibleState() ) - { - // set default indicator type (enable the quick panel) - OnIndicatorTypeChanged( INDICATOR_TYPE_1 ); - } - else - { - // set default indicator type (disable the quick panel) - OnIndicatorTypeChanged( INDICATOR_TYPE_2 ); - } - - SetVisible(mVisible); + UpdateVisibility(); } } } @@ -986,20 +978,29 @@ void Indicator::LoadPixmapImage( Ecore_Ipc_Event_Server_Data *epcEvent ) DALI_LOG_INFO( gIndicatorLogFilter, Debug::General, "mPixmap [%x]", mPixmap); CreateNewPixmapImage(); + UpdateVisibility(); + } +} - if( CheckVisibleState() ) - { - // set default indicator type (enable the quick panel) - OnIndicatorTypeChanged( INDICATOR_TYPE_1 ); - } - else - { - // set default indicator type (disable the quick panel) - OnIndicatorTypeChanged( INDICATOR_TYPE_2 ); - } +void Indicator::UpdateVisibility() +{ + if( CheckVisibleState() ) + { + // set default indicator type (enable the quick panel) + OnIndicatorTypeChanged( INDICATOR_TYPE_1 ); + } + else + { + // set default indicator type (disable the quick panel) + OnIndicatorTypeChanged( INDICATOR_TYPE_2 ); + } - SetVisible(mVisible); + if( !mIsShowing ) + { + mIndicatorContentActor.SetPosition( 0.0f, -mImageHeight, 0.0f ); } + + SetVisible(mVisible, true); } void Indicator::UpdateImageData( int bufferNumber ) @@ -1363,7 +1364,6 @@ void Indicator::DataReceived( void* event ) } break; } - } } break; diff --git a/adaptors/ecore/common/ecore-indicator-impl.h b/adaptors/ecore/common/ecore-indicator-impl.h index 4493113..53e93d1 100644 --- a/adaptors/ecore/common/ecore-indicator-impl.h +++ b/adaptors/ecore/common/ecore-indicator-impl.h @@ -290,6 +290,11 @@ private: void LoadPixmapImage( Ecore_Ipc_Event_Server_Data *epcEvent ); /** + * Update the visibility and position of the actors + */ + void UpdateVisibility(); + + /** * Inform dali that the indicator data has been updated. * @param[in] bufferNumber The shared file number */ -- 2.7.4