summaryrefslogtreecommitdiff
path: root/sw/source/ui/docvw/HeaderFooterWin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/docvw/HeaderFooterWin.cxx')
-rw-r--r--sw/source/ui/docvw/HeaderFooterWin.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx
index ff7d50eddf80..330c1ff4f6c6 100644
--- a/sw/source/ui/docvw/HeaderFooterWin.cxx
+++ b/sw/source/ui/docvw/HeaderFooterWin.cxx
@@ -153,6 +153,7 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag
m_pLine( NULL ),
m_bIsAppearing( false ),
m_nFadeRate( 100 ),
+ m_nDelayAppearing( 0 ),
m_aFadeTimer( )
{
// Get the font and configure it
@@ -243,6 +244,9 @@ void SwHeaderFooterWin::ShowAll( bool bShow )
if ( !PopupMenu::IsInExecute() )
{
m_bIsAppearing = bShow;
+ if ( bShow )
+ m_nDelayAppearing = 0;
+
if ( m_aFadeTimer.IsActive( ) )
m_aFadeTimer.Stop();
m_aFadeTimer.Start( );
@@ -516,6 +520,14 @@ void SwHeaderFooterWin::Select( )
IMPL_LINK( SwHeaderFooterWin, FadeHandler, Timer *, EMPTYARG )
{
+ const int TICKS_BEFORE_WE_APPEAR = 10;
+ if ( m_bIsAppearing && m_nDelayAppearing < TICKS_BEFORE_WE_APPEAR )
+ {
+ ++m_nDelayAppearing;
+ m_aFadeTimer.Start();
+ return 0;
+ }
+
if ( m_bIsAppearing && m_nFadeRate > 0 )
m_nFadeRate -= 25;
else if ( !m_bIsAppearing && m_nFadeRate < 100 )
@@ -535,7 +547,7 @@ IMPL_LINK( SwHeaderFooterWin, FadeHandler, Timer *, EMPTYARG )
Invalidate();
if ( IsVisible( ) && m_nFadeRate > 0 && m_nFadeRate < 100 )
- m_aFadeTimer.Start();
+ m_aFadeTimer.Start();
return 0;
}